Coverage for src/dirschema/log.py: 100%
8 statements
« prev ^ index » next coverage.py v7.2.5, created at 2023-05-08 15:24 +0000
« prev ^ index » next coverage.py v7.2.5, created at 2023-05-08 15:24 +0000
1"""Setup of logging for dirschema."""
3import logging
4import sys
6logger = logging.getLogger("dirschema")
7ch = logging.StreamHandler(sys.stderr)
8formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
10ch.setFormatter(formatter)
11logger.addHandler(ch)
13log_level = {0: logging.ERROR, 1: logging.WARNING, 2: logging.INFO, 3: logging.DEBUG}