forked from JRCSTU/CO2MPAS-TA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
logconf.yaml
142 lines (126 loc) · 3.69 KB
/
logconf.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
## Sample file with loggers used by co2mpas,
# for facilitating configuring their levels.
#
# You may copy it to ~/.co2_logconf.yaml and it will be loaded automatically,
# or pass it with --logconf
#
version: 1
## MUST set to false, or many logs are lost,
# see https://fangpenlin.com/posts/2012/08/26/good-logging-practice-in-python/#do-not-get-logger-at-the-module-level-unless-disable_existing_loggers-is-false
disable_existing_loggers: false
root:
level: INFO # one of: DEBUG INFO WARNING ERROR FATAL
#handlers: [console]
#handlers: [wsgi]
handlers: [colored]
loggers:
# co2gui: {}
# co2mpas: {}
# co2mpas_main: {}
# co2mpas.batch: {}
# co2mpas.io: {}
# co2mpas.io.dill: {}
# co2mpas.io.excel: {}
# co2mpas.io.schema: {}
# co2mpas.model: {}
# co2mpas.model.physical: {}
# co2mpas.model.physical.cycle: {}
# co2mpas.model.physical.cycle.WLTP: {}
# co2mpas.model.physical.engine.co2_emission: {}
# co2mpas.model.physical.final_drive: {}
# co2mpas.model.physical.wheels: {}
# co2mpas.model.selector: {}
# co2mpas.model.selector.co2_params: {}
# co2mpas.plan: {}
# co2dice: {}
# co2dice.cmdlets: {}
# co2dice.cfgcmd: {}
# co2dice.crypto: {}
# co2dice.project: {}
# co2dice.report: {}
# co2dice.tstamp: {}
# co2dice.tsigner: {}
## DICE libs:
#
# git: {}
# gnupg: {}
# socks: {}
# traitlets: {}
# transitions: {}
# asyncio: {}
# bcdocs: {}
# boto3: {}
# botocore: {}
# concurrent: {}
# dill: {}
# future_stdlib: {}
# pandalone: {}
# pandalone.xleash: {}
pandalone.xleash.io:
level: WARNING
# pandalone.xlsutils: {}
# past: {}
# PIL: {}
pip:
level: WARNING
# py: {}
# py.warnings: {}
# requests: {}
# s3fs: {}
# s3transfer: {}
# schedula: {}
# wltp: {}
## WebSttamper libs
#
# webstamp: {}
# handlers: [mail]
# flask_wtf: {}
# flask_wtf.csrf: {}
# werkzeug: {}
formatters:
long:
format: "%(asctime)-15s:%(levelname)5.5s:%(name)s:%(message)s"
# ## For webstamp Flask app,
# # from http://flask.pocoo.org/docs/dev/logging/#injecting-request-information
# req:
# class: webstamp.RequestFormatter
# format: >-
# %(asctime)s %(remote_addr)s requested %(url)s
# %(levelname)s in %(module)s: %(message)s
handlers:
console:
class: logging.StreamHandler
formatter: long
#level : INFO
#filters: [allow_foo]
#stream : ext://sys.stderr
colored:
class: co2mpas._vendor.rainbow_logging_handler.RainbowLoggingHandler
stream: ext://sys.stderr
formatter: long
datefmt: '%Y-%m-%d %H:%M:%S'
color_message_debug: [grey, null, false]
color_message_info: [blue, null, false]
color_message_warning: [yellow, null, true]
color_message_error: [red, null, true]
color_message_critical: [white, red, true]
# file:
# class : logging.handlers.RotatingFileHandler
# formatter: long
# filename: co2mpas.log
# maxBytes: 1024
# backupCount: 3
# ## From http://flask.pocoo.org/docs/dev/logging/#basic-configuration
# wsgi:
# class: logging.StreamHandler
# stream: "ext://webstamp.wsgi_errors_stream()"
# formatter: long
# ## See https://docs.python.org/3/library/logging.handlers.html#smtphandler
# mail:
# class: logging.handlers.SMTPHandler
# mailhost: 127.0.0.1
# fromaddr: foo@bar
# toaddrs:
# - admin@bar
# subject: '[Web Error]'
# level: ERROR