Browse Source

Adaption to new logging

master
Dirk Alders 3 years ago
parent
commit
576494b200
1 changed files with 6 additions and 2 deletions
  1. 6
    2
      __init__.py

+ 6
- 2
__init__.py View File

33
 import socket
33
 import socket
34
 import time
34
 import time
35
 
35
 
36
-logger_name = 'TCP_SOCKET'
37
-logger = logging.getLogger(logger_name)
36
+try:
37
+    from config import APP_NAME as ROOT_LOGGER_NAME
38
+except ImportError:
39
+    ROOT_LOGGER_NAME = 'root'
40
+
41
+logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
38
 
42
 
39
 
43
 
40
 class tcp_base(object):
44
 class tcp_base(object):

Loading…
Cancel
Save