File: dummy_logging.py

package info (click to toggle)
python-rq 2.3.3-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,428 kB
  • sloc: python: 12,349; makefile: 22; sh: 19
file content (19 lines) | stat: -rw-r--r-- 625 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# example config taken from <https://stackoverflow.com/a/7507842/784804>
DICT_CONFIG = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'standard': {'format': 'MY_LOG_FMT: %(asctime)s [%(levelname)s] %(name)s: %(message)s'},
    },
    'handlers': {
        'default': {
            'level': 'DEBUG',
            'formatter': 'standard',
            'class': 'logging.StreamHandler',
            'stream': 'ext://sys.stdout',  # Default is stderr
        },
    },
    'loggers': {
        'root': {'handlers': ['default'], 'level': 'DEBUG', 'propagate': False},  # root logger
    },
}