Selective logging
This doesn't solve #9 (closed) per se, but it gives more fine grained control over verbosity.
This introduces a function pytential.log.set_up_logging()
which
takes a list of modules and creates a configurable
logger and formatter for each of those modules.
Logging may be controlled through environment variables. Example:
PYTENTIAL_LOG_DEBUG=pytential:loopy PYTENTIAL_LOG_INFO=boxtree python test.py
This command will set up debug logging for pytential and loopy and set up info level logging for boxtree.
Note that this feature shouldn't be used with code that calls
logging.basicConfig()
, since logging.basicConfig()
sets up a root handler
which overrides everything that we do.