Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
twn39
/
starship
like
0
Runtime error
App
Files
Files
Community
main
starship
/
log.py
curry tang
add logger
d9cc5c0
3 months ago
raw
Copy download link
history
blame
contribute
delete
Safe
246 Bytes
import
logging
logging.basicConfig(
level=logging.INFO,
# 设置日志级别
format
=
'%(asctime)s - %(name)s - %(levelname)s - %(message)s'
,
handlers=[
logging.FileHandler(
'app.log'
),
logging.StreamHandler(),
]
)