-
Notifications
You must be signed in to change notification settings - Fork 94
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
Give logger a null handler on start up #2944
Give logger a null handler on start up #2944
Conversation
We should revisit logging as part of the 2to3 effort (or soon after) and have a better strategy. |
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.
Looks good to me.
So, cylc logger will always have a handler. CylcOptionParser will ensure that commands will have a valid logging handler. Scheduler will do likewise for daemonized suites. Use CylcOptionParser for all remaining user commands: * cylc cycle-point * cylc documentation * cylc get-gui-config * cylc get-site-config This ensures that these commands will have logging handlers set.
0c47441
to
59caceb
Compare
(Sorry, just re-based.) I have also added a compatibility check - as Python <2.7 does not have |
Not a problem, just one line change with the new |
Sorry I didn't refresh this page before merging so missed your comments, feel free to revert. |
So, cylc logger will always have a handler. CylcOptionParser will ensure
that commands will have a valid logging handler. Scheduler will do
likewise for daemonized suites.
Use CylcOptionParser for all remaining user commands:
This ensures that these commands will have logging handlers set.
Fix #2940.