legnaleurc / wcpan.logging

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wcpan.logging

A configuration generator for builtin logging module.

This module does not have any side effect, it is the user's choice to put it into logging.dictConfig.

import logging

from wcpan.logging import ConfigBuilder


logging.dictConfig(
    ConfigBuilder(path="/your/log", rotate=True)
    .add("moduleA", level="DEBUG")
    .add("moduleB", "moduleC", level="INFO")
    .to_dict()
)

About

License:MIT License


Languages

Language:Python 94.4%Language:Makefile 5.6%