Open Klankers opened 2 months ago
As discussed today:
reporting
should be able to scrape ctdcal.log
and get the details of the last run, or series of runs.logging
module, rather than __main__
.Granted I wasn't at the actual meeting where this was talked about....
Could you clarify what you mean by logging should be initialized once? The built in python logging is separated into logging emitters and handlers. Logging emitters should be done by using the a logging. getLogger(__main__)
call at the top of the each file that will emit log messages. Logging handlers should be initialized by whatever script is going to do something with the log messages. For a cli, then a __main__.py
might be the right place or even inside a if __name__ == "__main__"
guard. In general, you don't want your library code to have any log handlers, only log emitters.
Consolidate all applicable functions, classes, modules (new and old) to some new tracking subset. This could include
logging
andreporting
, handling performance and data statistics.