瀏覽代碼

Adaption to new logging

master
Dirk Alders 3 年之前
父節點
當前提交
5f30383c83
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. 5
    1
      views.py

+ 5
- 1
views.py 查看文件

@@ -10,7 +10,11 @@ import os
10 10
 import themes
11 11
 from django.contrib import messages
12 12
 
13
-logger = logging.getLogger('APP')
13
+try:
14
+    from config import APP_NAME as ROOT_LOGGER_NAME
15
+except ImportError:
16
+    ROOT_LOGGER_NAME = 'root'
17
+logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
14 18
 
15 19
 
16 20
 def get_method(import_string):

Loading…
取消
儲存