-
Notifications
You must be signed in to change notification settings - Fork 0
/
logging.ini
73 lines (60 loc) · 1.75 KB
/
logging.ini
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
[loggers]
keys=root,pyutils
[handlers]
keys=consoleHandler,FileHandler,RotatingFileHandler,TimedRotatingFileHandler
[formatters]
keys=simpleFormatter,timedRotatingFormatter
[logger_root]
level=NOTSET
#handlers=consoleHandler,FileHandler
handlers=consoleHandler
#Level Numeric value
#CRITICAL 50
#ERROR 40
#WARNING 30
#INFO 20
#DEBUG 10
#NOTSET 0
[logger_pyutils]
level=ERROR
#handlers=consoleHandler,RotatingFileHandler,TimedRotatingFileHandler
handlers=consoleHandler
qualname=pyutils
propagate=0
[handler_consoleHandler]
class=StreamHandler
level=NOTSET
formatter=simpleFormatter
args=(sys.stdout,)
[handler_FileHandler]
class=FileHandler
level=WARNING
formatter=simpleFormatter
args=('twido.log',)
[handler_RotatingFileHandler]
class=handlers.RotatingFileHandler
level=DEBUG
formatter=simpleFormatter
args=('twido.log','a',10485760,5) # every 10M bytes rotate
#(filename, writeMode, maxBytes = 2000, backupCount)
[handler_TimedRotatingFileHandler]
class=handlers.TimedRotatingFileHandler
level=DEBUG
formatter=timedRotatingFormatter
args=('twido.log', 'D', 1, 5) # every 1 Day rotate
#(filename, when='h', interval=1, backupCount=0, encoding=None, delay=False, utc=False)
#Value Type of interval
#’S’ Seconds
#’M’ Minutes
#’H’ Hours
#’D’ Days
#’W’ Week day (0=Monday)
#’midnight’ Roll over at midnight
[formatter_simpleFormatter]
;format=%(levelname)-7s [%(asctime)s] [%(process)-6d] [%(threadName)-10s] %(name)-30s %(funcName)-35s %(lineno)-5d: %(message)s
format=%(levelname)-8s [%(asctime)s] [%(process)6d] %(name)30s.%(funcName)-30s %(lineno)5d: %(message)s
datefmt=%y-%m-%d %H:%M:%S
[formatter_timedRotatingFormatter]
format=%(asctime)s.%(msecs)d %(name)-12s %(levelname)-8s %(message)s
datefmt=%y-%m-%d %H:%M:%S
#datefmt=%y-%m-%d %H:%M:%S %p