Ver código fonte

Adaption to new logging

master
Dirk Alders 4 anos atrás
pai
commit
53e9e080f8
1 arquivos alterados com 6 adições e 2 exclusões
  1. 6
    2
      __init__.py

+ 6
- 2
__init__.py Ver arquivo

@@ -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):

Carregando…
Cancelar
Salvar