增加日志

This commit is contained in:
zhaoawd
2025-11-03 00:19:43 +08:00
parent fe1de87696
commit 799b9f8154
2 changed files with 32 additions and 0 deletions

30
logging.yaml Normal file
View File

@ -0,0 +1,30 @@
version: 1
formatters:
standard:
format: "%(asctime)s %(levelname)s %(name)s:%(lineno)d %(message)s"
handlers:
console:
class: logging.StreamHandler
level: INFO
formatter: standard
stream: ext://sys.stdout
file:
class: logging.handlers.RotatingFileHandler
level: INFO
formatter: standard
filename: logs/app.log
maxBytes: 10485760 # 10 MB
backupCount: 5
encoding: utf-8
loggers:
app:
level: INFO
handlers:
- console
- file
propagate: no
root:
level: INFO
handlers:
- console
- file

View File

@ -9,3 +9,5 @@ numpy>=1.24
openpyxl>=3.1 openpyxl>=3.1
httpx==0.27.2 httpx==0.27.2
python-dotenv==1.0.1 python-dotenv==1.0.1
requests>=2.31.0
PyYAML>=6.0.1