jaantollander / loggingtools

Python logging configuration from a dictionary using yaml or json.

Home Page:https://loggingtools.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Python logging configuration from a dictionary using yaml or json.

https://loggingtools.readthedocs.io/en/latest/

License:MIT License


Languages

Language:Python 100.0%