Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.19 KB

README.rst

File metadata and controls

45 lines (31 loc) · 1.19 KB

logconf-dsl

A DSL for configuration of Python's logging module.

Installation

From PyPI with pip:

pip install logconf-dsl

directly from git, with pip.

pip install -e git+git@github.com:joar/logconf.git

Usage

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'])
    ]
)