-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlogging.yaml
More file actions
45 lines (38 loc) · 976 Bytes
/
Copy pathlogging.yaml
File metadata and controls
45 lines (38 loc) · 976 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
40
41
42
43
44
45
# logging.yaml - Advanced logging configuration
version: 1
disable_existing_loggers: false
formatters:
verbose:
format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
datefmt: '%Y-%m-%d %H:%M:%S'
json:
class: pythonjsonlogger.jsonlogger.JsonFormatter
format: '%(asctime)s %(name)s %(levelname)s %(message)s'
handlers:
console:
class: logging.StreamHandler
level: INFO
formatter: verbose
stream: ext://sys.stdout
file:
class: logging.handlers.RotatingFileHandler
level: DEBUG
formatter: verbose
filename: logs/platform.log
maxBytes: 10485760 # 10MB
backupCount: 5
json_file:
class: logging.handlers.RotatingFileHandler
level: INFO
formatter: json
filename: logs/platform.json.log
maxBytes: 10485760
backupCount: 3
loggers:
apt_platform:
level: INFO
handlers: [console, file, json_file]
propagate: false
root:
level: INFO
handlers: [console, file]