瀏覽代碼

Adaption to new logging

master
Dirk Alders 4 年之前
父節點
當前提交
53e9e080f8
共有 1 個檔案被更改,包括 6 行新增2 行删除
  1. 6
    2
      __init__.py

+ 6
- 2
__init__.py 查看文件

@@ -3,8 +3,12 @@ import numbers
3 3
 import os
4 4
 import time
5 5
 
6
-logger_name = 'HELPERS'
7
-logger = logging.getLogger(logger_name)
6
+try:
7
+    from config import APP_NAME as ROOT_LOGGER_NAME
8
+except ImportError:
9
+    ROOT_LOGGER_NAME = 'root'
10
+
11
+logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
8 12
 
9 13
 
10 14
 class continues_statistic(dict):

Loading…
取消
儲存