Add support for color-enabled, module selective logging.
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(), as logging.basicConfig() sets up a root handler which overrides everything that we do. See also: #9
Loading
Please register or sign in to comment