-
Notifications
You must be signed in to change notification settings - Fork 1
/
logging.config.yaml
45 lines (36 loc) · 1.35 KB
/
logging.config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: 1
disable_existing_loggers: true
# https://kingspp.github.io/design/2017/11/06/the-head-and-tail-of-logging.html
# Logging formatter definition
# For more details on format types,
# visit - 'https://docs.python.org/3/library/logging.html#logrecord-attributes
formatters:
standard:
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
error:
format: "E %(levelname)s <PID %(process)d:%(processName)s> %(name)s.%(funcName)s(): %(message)s"
colored_console:
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
'()': 'coloredlogs.ColoredFormatter'
datefmt: '%m-%d %H:%M:%S'
#format_for_file:
# format: "%(asctime)s :: %(levelname)s :: %(funcName)s in %(filename)s (l:%(lineno)d) :: %(message)s"
# datefmt: '%Y-%m-%d %H:%M:%S'
# Logging handlers
# Console and Error Console belongs to StreamHandler whereas info_file_handler belongs to Rotating File Handler
# For a list of pre-defined handlers, visit - 'https://docs.python.org/3/library/logging.handlers.html#module-logging.handlers'
handlers:
console:
class: logging.StreamHandler
level: DEBUG
formatter: colored_console
stream: ext://sys.stderr
root:
level: DEBUG
handlers: [console]
propogate: yes
loggers:
twisted:
level: DEBUG
__main__:
level: DEBUG