-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogger.conf
More file actions
59 lines (50 loc) · 1.37 KB
/
logger.conf
File metadata and controls
59 lines (50 loc) · 1.37 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
48
49
50
51
52
53
54
55
56
57
58
59
# everything is well desribe at https://realpython.com/python-logging/
[loggers]
keys=root
[handlers]
# list here all possible handlers. Logger can call sme of them.
keys=consoleHandler, fileHandlerErr, fileHandlerDeb
[formatters]
# list here all formatters. Each handler can use its own formatter.
keys=sampleFormatter
[logger_root]
#below you can set minimum level when logger to be called
# DEBUG = all messages; INFO = > DEBUG; WARNING > INFO, etc.
#
# CRITICAL 50
# ERROR 40
# WARNING 30
# INFO 20
# DEBUG 10
# NOTSET 0
#
#level=INFO
level=DEBUG
#level=WARNING
# here you can add/delete necessary calls for outputs.
# I use all available handlers for logging: one for console, two for files.
handlers=consoleHandler, fileHandlerErr
#, fileHandlerDeb
# description of [handlers]
# event with severity >=DEBUG will appear in console
[handler_consoleHandler]
class=StreamHandler
#level=DEBUG
level=INFO
formatter=sampleFormatter
args=(sys.stdout,)
# event with severity >=ERROR will appear in file
[handler_fileHandlerErr]
class=FileHandler
level=ERROR
formatter=sampleFormatter
args=('my_error.log','w')
# event with severity >=DEBUG will appear in file
[handler_fileHandlerDeb]
class=FileHandler
level=DEBUG
formatter=sampleFormatter
args=('my_debug.log','w')
# description of [formatters]
[formatter_sampleFormatter]
format=%(asctime)s : %(name)s : %(levelname)s : %(message)s