adds mediachain.utils.log with a config_logging method that sets the log level and lets you optionally enable logging to a file.
when you want to get a logger, you should use mediachain.utils.log.get_logger instead of the default logging.getLogger, so that the current log configuration will be applied.
If you never call config_logging, no log output will be produced; this is the recommended default for libraries, since you want the applications using the lib to determine the log settings.
If you run the mediachain cli, we call config_logging early in mediachain.cli.main, and set the level to the value of the MEDIACHAIN_VERBOSITY env var, or WARNING if that's not set.
89
adds
mediachain.utils.log
with aconfig_logging
method that sets the log level and lets you optionally enable logging to a file.when you want to get a logger, you should use
mediachain.utils.log.get_logger
instead of the defaultlogging.getLogger
, so that the current log configuration will be applied.If you never call
config_logging
, no log output will be produced; this is the recommended default for libraries, since you want the applications using the lib to determine the log settings.If you run the
mediachain
cli, we callconfig_logging
early inmediachain.cli.main
, and set the level to the value of theMEDIACHAIN_VERBOSITY
env var, orWARNING
if that's not set.