/loggingtools

Python logging configuration from a dictionary using yaml or json.

Primary LanguagePythonMIT LicenseMIT

Python Tools for Setting up Logging

Travis continuous intergration Appveoyr continuous intergration Codecov coverage hosting Code issues Updates Join the chat at https://gitter.im/loggingtools/Lobby Documentation Status

Loggingtools

setup_logging

import logging
from loggingtools import setup_logging
setup_logging('logging.yml')
logger = logging.getLogger('<your_logger>')
...

log_with

import logging
from loggingtools import log_with

...  # setup your loggers

logger = logging.getLogger('<your_logger>')

@log_with(logger)
def function(arg, arg2):
    ...

Installation

Loggingtools can be installed through pip using command

pip install loggingtools

Command Line Client

loggingtools config

Command line arguments

-n, --filename=logging
 Filename for logging configuration
-f, --fileformat=yml
 Fileformat: {yml, json}

References