45 lines
965 B
Plaintext
45 lines
965 B
Plaintext
[loggers]
|
||
keys=root,AutoMihoyoBBS
|
||
|
||
[handlers]
|
||
keys=fileHandler,consoleHandler
|
||
|
||
[formatters]
|
||
keys=simpleFormatter
|
||
|
||
; 缺少root logger会报错
|
||
[logger_root]
|
||
level=DEBUG
|
||
handlers=fileHandler,consoleHandler
|
||
|
||
[logger_AutoMihoyoBBS]
|
||
level=WARNING
|
||
qualname=fileHandler,consoleHandler
|
||
handlers=fileHandler,consoleHandler
|
||
|
||
; console
|
||
[handler_consoleHandler]
|
||
class=StreamHandler
|
||
args=(sys.stdout,)
|
||
level=INFO
|
||
formatter=simpleFormatter
|
||
|
||
; file
|
||
[handler_fileHandler]
|
||
class=FileHandler
|
||
args=('logging.log', 'a')
|
||
level=DEBUG
|
||
formatter=simpleFormatter
|
||
|
||
; 由于官方的SMTPHandler似乎不支持ssl邮箱,暂时不使用
|
||
; Email
|
||
; [handler_SMTPHandler]
|
||
; class=handlers.SMTPHandler
|
||
; ; logging.handlers.SMTPHandler(mailhost,fromaddr,toaddrs,subject,credentials = None,secure = None,timeout = 1.0)
|
||
; args=()
|
||
; level=ERROR
|
||
; formatter=simpleFormatter
|
||
|
||
[formatter_simpleFormatter]
|
||
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
|
||
datefmt=%Y-%m-%dT%H:%M:%S |