-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogging.yaml
More file actions
39 lines (37 loc) · 894 Bytes
/
Copy pathlogging.yaml
File metadata and controls
39 lines (37 loc) · 894 Bytes
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
version: 1
disable_existing_loggers: false
formatters:
standard:
format: '%(asctime)s [%(levelname)s] %(name)s: %(message)s'
json:
# Use custom JSONFormatter - no external dependencies
class: babylon.kernel.log.JSONFormatter
handlers:
console:
class: logging.StreamHandler
level: INFO
formatter: standard
stream: ext://sys.stdout
file:
class: logging.handlers.RotatingFileHandler
level: DEBUG
formatter: json
filename: 'logs/babylon.log'
maxBytes: 10000000 # 10MB
backupCount: 5
error_file:
class: logging.handlers.RotatingFileHandler
level: ERROR
formatter: json
filename: 'logs/errors.log'
maxBytes: 5000000 # 5MB
backupCount: 10
loggers:
'':
level: DEBUG
handlers: [console, file, error_file]
# Suppress noisy third-party loggers
httpx:
level: WARNING
httpcore:
level: WARNING