Skip to content
Commit 382fac2a authored by Matt Wala's avatar Matt Wala
Browse files

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
parent 68fb5ab6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment