-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogging.yml
More file actions
47 lines (47 loc) · 1.61 KB
/
logging.yml
File metadata and controls
47 lines (47 loc) · 1.61 KB
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
45
46
47
version: 1
# filename_format: '%Y-%m-%d_UTC%z'
# incremental False = replaces the existing configuration
incremental: False
# disable_existing_loggers will be ignored if incremental is True
disable_existing_loggers: False
loggers:
litestar:
level: 'DEBUG'
handlers: ['compressed_timed_rotating_file_handler', 'queue_listener_handler']
propagate: False
mtflow:
level: 'DEBUG'
handlers: ['compressed_timed_rotating_file_handler', 'queue_listener_handler']
propagate: False
handlers:
compressed_timed_rotating_file_handler:
class: 'pfund_kit.logging.handlers.CompressedTimedRotatingFileHandler'
level: 'DEBUG'
formatter: 'file'
filters: ['trimmedpath']
when: 'midnight'
backupCount: 7
utc: true
encoding: 'utf-8'
stream_handler:
class: 'logging.StreamHandler'
level: 'INFO'
formatter: 'console'
filters: ['trimmedpath']
# REVIEW: for python >= 3.12, litestar has a new way to handle this, they might drop this handler in the future
queue_listener_handler:
class: 'litestar.logging.standard.QueueListenerHandler'
level: 'DEBUG'
formatter: 'console'
filters: ['trimmedpath']
formatters:
file:
format: '%(asctime)s.%(msecs)03d | %(levelname)s | %(name)s | %(message)s | %(trimmedpath)s fn:%(funcName)s ln:%(lineno)d'
datefmt: '%H:%M:%S%z'
console:
(): pfund_kit.logging.formatters.ColoredFormatter
format: '%(asctime)s.%(msecs)03d | %(levelname)s | %(name)s | %(message)s | %(trimmedpath)s fn:%(funcName)s ln:%(lineno)d'
datefmt: '%Y-%m-%dT%H:%M:%S%z'
filters:
trimmedpath:
(): pfund_kit.logging.filters.TrimmedPathFilter