Explorar el Código

Adaption to new logging

master
Dirk Alders hace 4 años
padre
commit
53e9e080f8
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  1. 6
    2
      __init__.py

+ 6
- 2
__init__.py Ver fichero

@@ -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…
Cancelar
Guardar