-
Notifications
You must be signed in to change notification settings - Fork 38
/
config-logging.yml
51 lines (50 loc) · 1.43 KB
/
config-logging.yml
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
48
49
50
51
# Logger configuration
---
version: 1
disable_existing_loggers: false
formatters:
console:
format: '%(asctime)s UTC [%(process)d] %(levelname)-7s %(message)s'
brief:
format: '%(levelname)-7s [%(process)d] %(message)s'
debug:
format: '%(asctime)s UTC [%(process)d] %(levelname)-7s %(name)s:%(lineno)s %(message)s'
filters:
only_cmor: # only events from CMOR check and generic fixes
(): esmvalcore.config._logging.FilterMultipleNames
names: [esmvalcore.cmor.check, esmvalcore.cmor._fixes.fix.genericfix]
mode: allow
no_cmor: # no events from CMOR check and generic fixes
(): esmvalcore.config._logging.FilterMultipleNames
names: [esmvalcore.cmor.check, esmvalcore.cmor._fixes.fix.genericfix]
mode: disallow
handlers:
console:
class: logging.StreamHandler
level: INFO
formatter: console
stream: ext://sys.stdout
filters: [no_cmor]
simple_log_file:
class: logging.FileHandler
level: INFO
formatter: brief
filename: main_log.txt
mode: w
filters: [no_cmor]
debug_log_file:
class: logging.FileHandler
level: DEBUG
formatter: debug
filename: main_log_debug.txt
mode: w
cmor_log: # only contains output from CMOR check and generic fixes
class: logging.FileHandler
level: INFO
formatter: brief
filename: cmor_log.txt
mode: w
filters: [only_cmor]
root:
level: DEBUG
handlers: [console, simple_log_file, debug_log_file, cmor_log]