File: logger.py

package info (click to toggle)
git-pw 2.7.1-0.1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 540 kB
  • sloc: python: 2,766; makefile: 4
file content (15 lines) | stat: -rw-r--r-- 344 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""
Configure application logging.
"""

import logging


def configure_verbosity(debug: bool) -> None:
    if debug:
        logging.basicConfig(
            level=logging.DEBUG,
            format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
        )
    else:
        logging.basicConfig(level=logging.INFO, format='%(message)s')