diff --git a/ptools/settings.py b/ptools/settings.py index 30297be..77bc5d8 100644 --- a/ptools/settings.py +++ b/ptools/settings.py @@ -187,8 +187,8 @@ LOGGING = { # 新增内容 'class': 'logging.handlers.TimedRotatingFileHandler', 'filename': os.path.join(BASE_DIR, 'db/logs.log'), - 'when': 'h', - 'interval': 1, + 'when': 'm', + 'interval': 10, 'backupCount': 30, # 'class': 'logging.handlers.RotatingFileHandler', # 'filename': "db/{}.log".format(datetime.datetime.today()), # 日志文件的位置 diff --git a/templates/auto_pt/showlog.html b/templates/auto_pt/showlog.html index f9dedb2..a86a4f6 100644 --- a/templates/auto_pt/showlog.html +++ b/templates/auto_pt/showlog.html @@ -23,45 +23,28 @@ line-height: 20px; word-break: break-word; } + .logs > code { }
- - - - {# #} - {# #} - - - - - - {# #} - - - - - {# #} - {# #} - {# #} - {# #} - {# 查看#} - {# 新增#} - {# 删除#} - {# #} - {# #} - {# 王小虎#} - {# #} - - -
- -
-
-
+
+ + + + +
+ + +
+ +
+
@@ -74,7 +57,8 @@ data() { return { names: [], - logs: [] + log: '', + logs: [], } }, beforeMount() { @@ -114,8 +98,10 @@ }); }) }, - showLog(name) { - console.log(name) + showLog() { + {#console.log(name)#} + let name = this.log + console.log(this.log) axios.get( "{% url 'get_log_content' %}" + '?name=' + name ).then(res => {