Sfoglia il codice sorgente

Adaption to new logging

master
Dirk Alders 4 anni fa
parent
commit
53e9e080f8
1 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. 6
    2
      __init__.py

+ 6
- 2
__init__.py Vedi File

@@ -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…
Annulla
Salva