Sfoglia il codice sorgente

New logging added to forgotten module piface_function

mod_update
Dirk Alders 3 anni fa
parent
commit
86715dd1eb
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5
    1
      piface_function.py

+ 5
- 1
piface_function.py Vedi File

@@ -12,7 +12,11 @@ import task
12 12
 import random
13 13
 import time
14 14
 
15
-logger = logging.getLogger('APP')
15
+try:
16
+    from config import APP_NAME as ROOT_LOGGER_NAME
17
+except ImportError:
18
+    ROOT_LOGGER_NAME = 'root'
19
+logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
16 20
 
17 21
 geo_position = geo.gps.coordinate(lat=49.976596, lon=9.1481443)
18 22
 

Loading…
Annulla
Salva