Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging for Dokchitser scripts #11134

Closed
jdemeyer opened this issue Apr 6, 2011 · 12 comments
Closed

Add logging for Dokchitser scripts #11134

jdemeyer opened this issue Apr 6, 2011 · 12 comments

Comments

@jdemeyer
Copy link

jdemeyer commented Apr 6, 2011

The attached patch adds a logfile for the Dokchitser gp scripts. This is something that I personally needed while debugging some issues with a new PARI package (#11130).

Component: interfaces

Keywords: dokchitser gp

Author: Jeroen Demeyer

Reviewer: John Cremona

Merged: sage-4.7.1.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/11134

@JohnCremona
Copy link
Member

comment:2

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

@jdemeyer
Copy link
Author

comment:3

Replying to @JohnCremona:

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).

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

comment:4

Replying to @JohnCremona:

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)

@JohnCremona
Copy link
Member

comment:5

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.

@jdemeyer
Copy link
Author

comment:6

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.

@jdemeyer
Copy link
Author

Attachment: 11134_dokchitser.patch.gz

@jdemeyer
Copy link
Author

Reviewer: John Cremona

@jdemeyer
Copy link
Author

comment:7

Replying to @JohnCremona:

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).

@JohnCremona
Copy link
Member

comment:8

Looks fine, testing now...

@JohnCremona
Copy link
Member

comment:9

Replying to @JohnCremona:

Looks fine, testing now...

... and all passed.

@jdemeyer
Copy link
Author

Merged: sage-4.7.1.alpha0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants