Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
network-assets-reptile
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
network-assets-reptile
Commits
dfc1e7b7
Commit
dfc1e7b7
authored
Jul 10, 2023
by
liyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:调试数据入库
parent
b1234161
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
4 deletions
+14
-4
app.log
app.log
+11
-0
settings.py
config/settings.py
+1
-1
error.log
error.log
+0
-0
Logger.py
utils/Logger.py
+2
-3
No files found.
app.log
View file @
dfc1e7b7
...
...
@@ -163,3 +163,14 @@
2023-07-10 09:08:23,702 - WARNING - aaaa
2023-07-10 09:08:23,702 - ERROR - aaaa
2023-07-10 09:08:23,702 - ERROR - aaaa
2023-07-10 18:51:20,682 DEBUG pc_ptt.py : main [line: 187] 调用成功
2023-07-10 18:51:28,446 DEBUG pc_ptt.py : reptile [line: 88] 网页链接https://www.ptt.cc/bbs/Baseball/M.1688985401.A.746.html
2023-07-10 18:51:28,524 DEBUG pc_ptt.py : reptile [line: 127] 未找到匹配的字符串
2023-07-10 18:51:29,740 DEBUG pc_ptt.py : reptile [line: 88] 网页链接https://www.ptt.cc/bbs/Baseball/M.1688985588.A.3E1.html
2023-07-10 18:51:29,849 DEBUG pc_ptt.py : reptile [line: 127] 未找到匹配的字符串
2023-07-10 18:51:31,061 DEBUG pc_ptt.py : reptile [line: 88] 网页链接https://www.ptt.cc/bbs/Baseball/M.1688985742.A.9F7.html
2023-07-10 18:51:31,107 DEBUG pc_ptt.py : reptile [line: 127] 未找到匹配的字符串
2023-07-10 18:51:32,309 DEBUG pc_ptt.py : reptile [line: 88] 网页链接https://www.ptt.cc/bbs/Baseball/M.1688985757.A.1A0.html
2023-07-10 18:51:32,344 DEBUG pc_ptt.py : reptile [line: 127] 未找到匹配的字符串
2023-07-10 18:51:33,608 DEBUG pc_ptt.py : reptile [line: 88] 网页链接https://www.ptt.cc/bbs/Baseball/M.1634212242.A.283.html
2023-07-10 18:51:34,715 DEBUG pc_ptt.py : reptile [line: 157] 文件保存成功
config/settings.py
View file @
dfc1e7b7
# 日志文件路径
def
get_log_path
():
return
".
.
/"
return
"./"
error.log
0 → 100644
View file @
dfc1e7b7
utils/Logger.py
View file @
dfc1e7b7
...
...
@@ -9,10 +9,9 @@ class MyLogger(Logger):
def
__init__
(
self
):
# log_name = '{}.log'.format(time.strftime("%Y_%m_%d_%H_%M_%S", time.localtime()))
# log_path_file = os.path.join(get_log_path(), log_name)
# 获取日志文件路径
all_log_path_file
=
os
.
path
.
join
(
get_log_path
(),
"api
.log"
)
error_log_path_file
=
os
.
path
.
join
(
get_log_path
(),
"error.log"
)
all_log_path_file
=
os
.
path
.
abspath
(
get_log_path
()
+
"app
.log"
)
error_log_path_file
=
os
.
path
.
abspath
(
get_log_path
()
+
"error.log"
)
# 设置日志的名字、日志的收集级别
super
()
.
__init__
(
"test_api"
,
logging
.
DEBUG
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment