-
Notifications
You must be signed in to change notification settings - Fork 8
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
Set logger levels through handler #209
Conversation
Pull Request Test Coverage Report for Build 7559203886
💛 - Coveralls |
Here is the comment from Rubel where he reports that this works in nomad: #191 (comment) |
I changed the way Nomad deals with this. I do not want to have a hot potato being passed around in function arguments. 😄 I just access the logging object of pynxtool during runtime from Nomad and switch it to what Nomad needs it to work. This way we don't have to change much in our code or add a special check if we are running under Nomad etc. See this MR on Nomad: https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR/-/merge_requests/1638 |
That's perfect 👍️ This PR looks also good, I think it just needs some more replacements of the pynxtools logger import. But from my view this should be good to go then. |
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.
LGTM, except one small question whether we need to set the streamhandler manually (but there is probably a good reason).
LGTM, feel free to merge anytime you guys are happy with it. |
Configures logging with a handler. If you only configure a level for your logger, but no handlers, the internal handler is used which is set to output just the message (with no other formatting) at the
WARNING
level (see this reference). Currently, this prevents the printing ofINFO
level loggings to the console (including when using thegenerate-template
flag).Fixes #208.