增加日志
This commit is contained in:
30
logging.yaml
Normal file
30
logging.yaml
Normal 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
|
||||
@ -9,3 +9,5 @@ numpy>=1.24
|
||||
openpyxl>=3.1
|
||||
httpx==0.27.2
|
||||
python-dotenv==1.0.1
|
||||
requests>=2.31.0
|
||||
PyYAML>=6.0.1
|
||||
|
||||
Reference in New Issue
Block a user