MihoyoBBSTools/config/logging.ini.example

44 lines
930 B
Plaintext
Raw Normal View History

[loggers]
keys=root,AutoMihoyoBBS
[handlers]
keys=fileHandler,consoleHandler
[formatters]
keys=simpleFormatter
; 缺少root logger会报错
[logger_root]
level=DEBUG
handlers=fileHandler,consoleHandler
[logger_AutoMihoyoBBS]
level=WARNING
handlers=fileHandler,consoleHandler
; console
[handler_consoleHandler]
class=StreamHandler
args=(sys.stdout,)
level=DEBUG
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(mailhostfromaddrtoaddrssubjectcredentials = Nonesecure = Nonetimeout = 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