-
Notifications
You must be signed in to change notification settings - Fork 84
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
Update logger #1044
base: master
Are you sure you want to change the base?
Update logger #1044
Conversation
@jverswijver From our prior discussion, the largest issue I see here is that if we are properly addition |
Yes, we should try to look for the config and if it is there we should load the log level for the user when we create the logger. Except of they have the log level set in their env which should take priority. |
@@ -248,6 +248,9 @@ def __setitem__(self, key, value): | |||
self._conf[key] = value | |||
else: | |||
raise DataJointError("Validator for {0:s} did not pass".format(key)) | |||
valid_logging_levels = ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] | |||
if "loglevel" in key and value in valid_logging_levels: |
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.
if "loglevel" in key and value in valid_logging_levels: | |
if "loglevel" == key and value in valid_logging_levels: |
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.
should probably raise an error if value is not valid?
small changes to logging behavior:
dj.config
is updated