Commit dfc1e7b7 authored by liyang's avatar liyang

feat:调试数据入库

parent b1234161
......@@ -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] 文件保存成功
# 日志文件路径
def get_log_path():
return "../"
return "./"
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment