Browse Source

Adaption to new logging

master
Dirk Alders 4 years ago
parent
commit
cdc9912f3d
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      __init__.py

+ 6
- 1
__init__.py View File

11
 from rpi_envsens.bmp import bmp_180
11
 from rpi_envsens.bmp import bmp_180
12
 import helpers
12
 import helpers
13
 
13
 
14
-logger = logging.getLogger('APP')
14
+try:
15
+    from config import APP_NAME as ROOT_LOGGER_NAME
16
+except ImportError:
17
+    ROOT_LOGGER_NAME = 'root'
18
+
19
+logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
15
 
20
 
16
 
21
 
17
 class my_base_protocol_tcp(socket_protocol.pure_json_protocol):
22
 class my_base_protocol_tcp(socket_protocol.pure_json_protocol):

Loading…
Cancel
Save