Browse Source

Adaption to new logging

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

+ 5
- 2
__init__.py View File

28
 import logging
28
 import logging
29
 from PIL import Image, ImageEnhance, ExifTags
29
 from PIL import Image, ImageEnhance, ExifTags
30
 
30
 
31
-logger_name = 'MEDIA'
32
-logger = logging.getLogger(logger_name)
31
+try:
32
+    from config import APP_NAME as ROOT_LOGGER_NAME
33
+except ImportError:
34
+    ROOT_LOGGER_NAME = 'root'
35
+logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
33
 
36
 
34
 
37
 
35
 __DESCRIPTION__ = """The Module {\\tt %s} is designed to help on all issues with media files, like tags (e.g. exif, id3) and transformations.
38
 __DESCRIPTION__ = """The Module {\\tt %s} is designed to help on all issues with media files, like tags (e.g. exif, id3) and transformations.

Loading…
Cancel
Save