FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-100-day/day-032/python_logging.py at master · cloudcg/python-100-day · GitHub
cloudcg
/
python-100-day
Public
forked from
zengqingfu1442/python-100-day
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-100-day
/
day-032
/
python_logging.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (12 loc) · 364 Bytes
Breadcrumbs
python-100-day
/
day-032
/
python_logging.py
Copy path
File metadata and controls
22 lines (12 loc) · 364 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import
logging
# 打印日志级别
def
test
():
logging
.
basicConfig
(
level
=
logging
.
DEBUG
)
logging
.
debug
(
'Python debug'
)
logging
.
info
(
'Python info'
)
logging
.
warning
(
'Python warning'
)
logging
.
error
(
'Python Error'
)
logging
.
critical
(
'Python critical'
)
test
()
# 记录可变数据
logging
.
warning
(
'%s before you %s'
,
'Look'
,
'leap!'
)
Back
|
FazBrowse Home
|
New Git URL