BerkeleyAutomation / autolab_core

Core utilities for Berkeley AutoLab.
https://berkeleyautomation.github.io/autolab_core
Apache License 2.0
80 stars 39 forks source link

Changed logging to use root logger. #11

Closed visatish closed 5 years ago

visatish commented 5 years ago

@jeffmahler This is the new proposed logging scheme that utilizes the root logger. Let me know if you have any suggestions. Note line 19 in logger.py. Basically the issue is that on configuration we want to change the formatter of the root logger's handle to stdout, and create/initialize one if a handler does not exist. However, there is no way afaik to get the stream of a particular handler. Then it gets kinda messy because we can't tell if one exists already, and we don't want to have duplicates. The current solution should work in our use cases, but would break if someone had a handle on the root logger to some other output stream like stderr.