Browse Source

Adaption to new logging

master
Dirk Alders 4 years ago
parent
commit
2fad968a8d
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      __init__.py

+ 5
- 2
__init__.py View File

32
 import sys
32
 import sys
33
 import time
33
 import time
34
 
34
 
35
-logger_name = 'KEYBOARD'
36
-logger = logging.getLogger(logger_name)
35
+try:
36
+    from config import APP_NAME as ROOT_LOGGER_NAME
37
+except ImportError:
38
+    ROOT_LOGGER_NAME = 'root'
39
+logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
37
 
40
 
38
 __DESCRIPTION__ = """The Module {\\tt %s} is designed to fetch data from a keyboatd (e.g. RFID-Reader).
41
 __DESCRIPTION__ = """The Module {\\tt %s} is designed to fetch data from a keyboatd (e.g. RFID-Reader).
39
 For more Information read the sphinx documentation.""" % __name__.replace('_', '\_')
42
 For more Information read the sphinx documentation.""" % __name__.replace('_', '\_')

Loading…
Cancel
Save