-
Notifications
You must be signed in to change notification settings - Fork 18
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
logging: configure default logging config #349
Conversation
7e6dbaf
to
d1a3532
Compare
(rebased) |
Ignore that, Tim found that an exception raised by the "play" service (within the bit which actually performs the play) appears to get printed rather than logged. As it happens that method makes extensive use of try/except and logs any exceptions which occur so this should not be an issue. I'm not sure why an exception raised there gets printed rather than logged, my guess is that it's related to the |
'filename': str(USER_CONF_ROOT / 'uiserver.log'), | ||
'mode': 'a', | ||
'backupCount': 5, | ||
'maxBytes': 10485760, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied from Cylc, perhaps we should reduce this a little?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the amount of logging the UIS doesn't produce I feel that this is likely to be overkill.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reckon 100'000 bytes should be ~2000 lines worth of log file which seems plenty long enough.
'maxBytes': 10485760, | |
'maxBytes': 100000, |
9b24be3
to
d1a3532
Compare
Could potentially bump this to the 1.0.2 milestone (only adds logging) but no pressure from our side (happy to use dev builds for the moment). |
* Bump Traitlets to >=5.2.1 (needed for logging_config) trait. * Add default logging config to write to ~/.cylc/uiserver/uiserver.log at the INFO level. * Document in the readme for now.
d1a3532
to
0860732
Compare
Rebased, added changelog. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Code looks sane
- Working as advertised
Provide a default logging setup for the UIS:
Note this only captures the CylcUIServer part of the log, the base ServerApp log (i.e. the jupyter_server log) and any extensions (e.g. jupyter_lab) are excluded (can be easily added if desired but not much use from the Cylc perspective).
In combination with #348 this should capture workflow state transitions and tracebacks which are useful for debugging and monitoring for issues.
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.