From c0273dc698fbecfa62954e25d8248debe4118ddd Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 18 Apr 2024 21:31:15 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=8E=BB=E6=8E=89=20js=20=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/jumpserver/settings/logging.py | 2 +- apps/templates/_foot_js.html | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/jumpserver/settings/logging.py b/apps/jumpserver/settings/logging.py index bd44e22dc..c0e873290 100644 --- a/apps/jumpserver/settings/logging.py +++ b/apps/jumpserver/settings/logging.py @@ -17,7 +17,7 @@ LOGGING = { 'disable_existing_loggers': False, 'formatters': { 'verbose': { - 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' + 'format': '%(levelname)s %(asctime)s %(pathname)s:%(lineno)d %(message)s' }, 'main': { 'datefmt': '%Y-%m-%d %H:%M:%S', diff --git a/apps/templates/_foot_js.html b/apps/templates/_foot_js.html index 0f6bf03c0..b01be189d 100644 --- a/apps/templates/_foot_js.html +++ b/apps/templates/_foot_js.html @@ -42,7 +42,10 @@ $.fn.select2.defaults.set('language', getUserLang()) const md = window.markdownit(); const markdownContent = document.querySelector('script[type="text/markdown"]').textContent; - document.getElementById('markdown-output').innerHTML = md.render(markdownContent); + const markdownRef = document.getElementById('markdown-output') + if (markdownRef) { + markdownRef.innerHTML = md.render(markdownContent); + } });