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):
...
Loggingtools can be installed through pip
using command
pip install loggingtools
loggingtools config
Command line arguments
-n, --filename=logging | |
Filename for logging configuration | |
-f, --fileformat=yml | |
Fileformat: {yml, json} |