Ticket #11134 (closed enhancement: fixed)
Add logging for Dokchitser scripts
| Reported by: | jdemeyer | Owned by: | was |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-4.7.1 |
| Component: | interfaces | Keywords: | dokchitser gp |
| Cc: | Work issues: | ||
| Report Upstream: | N/A | Reviewers: | John Cremona |
| Authors: | Jeroen Demeyer | Merged in: | sage-4.7.1.alpha0 |
| Dependencies: | Stopgaps: |
Attachments
Change History
comment:2 follow-ups: ↓ 3 ↓ 4 Changed 2 years ago by cremona
- Status changed from needs_review to needs_info
Applies fine t. 4.7.alpha4 and all tests pass. But I am a little concerned that with the patch, a log file is created whether or not the user wants one. This differs from the standard pexpect convention that a log file may be requested but is not created by default.
Would it work to move the logfile parameter to the init function, with default None, and have that function start up the interpreter?
John
comment:3 in reply to: ↑ 2 Changed 2 years ago by jdemeyer
- Description modified (diff)
Replying to cremona:
Applies fine t. 4.7.alpha4 and all tests pass. But I am a little concerned that with the patch, a log file is created whether or not the user wants one. This differs from the standard pexpect convention that a log file may be requested but is not created by default.
Let me just point out that gp (from PARI/GP) always logs by default (but this might be a bad thing too).
comment:4 in reply to: ↑ 2 Changed 2 years ago by jdemeyer
Replying to cremona:
Would it work to move the logfile parameter to the init function, with default None, and have that function start up the interpreter?
Not sure, because the Dokchitser stuff is often initialized indirectly.
I could live with the following:
logfile = None # For debugging #logfile = os.path.join(DOT_SAGE, 'dokchitser.log') g = sage.interfaces.gp.Gp(script_subdirectory='dokchitser', logfile=logfile)
comment:5 follow-up: ↓ 7 Changed 2 years ago by cremona
I had not noticed that gp always produces a logfile! I would vote to remove that and make it optional.
I prefer your "debugging" option. This may well need revisiting after we have put in the new-style Dokchitser interface as worked on by Henri Cohen and me and Martin Raum recently -- I ost track of where that got to.
comment:6 Changed 2 years ago by jdemeyer
- Status changed from needs_info to needs_work
The best solution would be to have some kind of global "logging" option, similar to the "proof" option that we have currently in Sage. However, this is certainly a more complex solution and not high on my priority list.
comment:7 in reply to: ↑ 5 Changed 2 years ago by jdemeyer
- Status changed from needs_work to needs_review
- Reviewers set to John Cremona
- Milestone changed from sage-4.7 to sage-4.7.1
Replying to cremona:
I prefer your "debugging" option.
Done. I chose the simplest solution for this ticket, but you are right that there is work to be done concerning logging (but not on this ticket).
comment:9 in reply to: ↑ 8 Changed 2 years ago by cremona
- Status changed from needs_review to positive_review
comment:10 Changed 2 years ago by jdemeyer
- Status changed from positive_review to closed
- Resolution set to fixed
- Merged in set to sage-4.7.1.alpha0

