Browse Source

Adaption to new logging

master
Dirk Alders 4 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,8 +33,12 @@ import logging
33 33
 import socket
34 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 44
 class tcp_base(object):

Loading…
Cancel
Save