Implement `logging`
Closed this issue · 1 comments
Nicholas-Schaub commented
Each file and/or class should define a logger
using the logging
package. Each logger should follow the format basic.{filename}.function/class
. Any place where a print
statement might be used for debugging purposes, instead using logger.debug()
so that these statements do not be removed later, and we can programatically turn them on/off through code or even an environment variable.
In the top level __init__
, look for an environment variable named BASIC_LOG_LEVEL
that can be used to set the log level.
For example, one use case pattern to show debug logs might be:
BASIC_LOG_LEVEL=DEBUG
python basic.py --options
...