A DSL for configuration of Python's logging
module.
From PyPI with pip
:
pip install logconf-dsl
directly from git, with pip
.
pip install -e git+git@github.com:joar/logconf.git
import logconf
from logconf.dsl import Logger, Handler
logconf.configure(
handlers=Handler('default',
'logging.StreamHandler',
level='DEBUG'),
root=Logger(level='ERROR',
handlers=['default']),
loggers=[
Logger('foo',
'DEBUG',
handlers=['default'])
]
)