-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathlogging.ini
More file actions
41 lines (30 loc) · 937 Bytes
/
logging.ini
File metadata and controls
41 lines (30 loc) · 937 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
[loggers]
keys = root
[handlers]
keys = stream_handler,file_handler
[formatters]
keys = formatter
# ========================================================
[logger_root]
level = DEBUG
qualname=root
handlers = stream_handler,file_handler
[handler_stream_handler]
class = StreamHandler
level = DEBUG
formatter = formatter
args = (sys.stdout,)
[handler_file_handler]
#class=logging.handlers.RotatingFileHandler
#args=('jscrapy_proxy.log','a',10000000,2,)
class = logging.handlers.TimedRotatingFileHandler
args = ('pyddns.log',"midnight",1,2)
level = INFO
formatter = formatter
[formatter_formatter]
format = %(asctime)s # %(filename)-15s:%(lineno)s # %(levelname)-8s # %(message)s
# references
# http://blog.csdn.net/chosen0ne/article/details/7319306
# https://www.jianshu.com/p/feb86c06c4f4
# http://pythonguidecn.readthedocs.io/zh/latest/writing/logging.html
# https://docs.python.org/3/howto/logging.html#configuring-logging