-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[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邮箱,暂时不使用 | ||
; [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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
# 进入脚本所在目录 | ||
cd $(cd `dirname $0`;pwd) | ||
# 随机延时$RANDOM值为1~32767 | ||
sleep $[$RANDOM%1200]; | ||
python ./main.py; |