Procházet zdrojové kódy

Logger creation simplified

make_mycreole_indenpendent_from_patt
Dirk Alders před 3 týdny
rodič
revize
997594e371
2 změnil soubory, kde provedl 2 přidání a 10 odebrání
  1. 1
    5
      context.py
  2. 1
    5
      views.py

+ 1
- 5
context.py Zobrazit soubor

@@ -8,11 +8,7 @@ from mycreole import url_upload
8 8
 from mycreole import parameter
9 9
 from themes import color_icon_url
10 10
 
11
-try:
12
-    from config import APP_NAME as ROOT_LOGGER_NAME
13
-except ImportError:
14
-    ROOT_LOGGER_NAME = 'root'
15
-logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
11
+logger = logging.getLogger(settings.ROOT_LOGGER_NAME).getChild(__name__)
16 12
 
17 13
 NEW_ATTACHMENT_UID = 'new_attachment'
18 14
 

+ 1
- 5
views.py Zobrazit soubor

@@ -14,11 +14,7 @@ import stringtools
14 14
 import themes
15 15
 from django.contrib import messages
16 16
 
17
-try:
18
-    from config import APP_NAME as ROOT_LOGGER_NAME
19
-except ImportError:
20
-    ROOT_LOGGER_NAME = 'root'
21
-logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
17
+logger = logging.getLogger(settings.ROOT_LOGGER_NAME).getChild(__name__)
22 18
 
23 19
 
24 20
 def get_next(request):

Načítá se…
Zrušit
Uložit