datajoint-python icon indicating copy to clipboard operation
datajoint-python copied to clipboard

Update logger

Open jverswijver opened this issue 2 years ago • 2 comments

small changes to logging behavior:

  • add check to update the logger when the dj.config is updated
  • make sure that environment variables are given priority over the config
  • should work with context manager now

jverswijver avatar Aug 17 '22 16:08 jverswijver

@jverswijver From our prior discussion, the largest issue I see here is that if we are properly addition loglevel to be used in the config, we should verify the case where a user has a dj_local_conf.json and first imports datajoint. Their log level should be appropriately set.

guzman-raphael avatar Aug 23 '22 12:08 guzman-raphael

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.

jverswijver avatar Aug 23 '22 14:08 jverswijver