From abcf63d02e866c3832d014c54f2a95acdfb7d304 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Thu, 21 Jan 2021 19:32:34 +0100 Subject: [PATCH] Adaption to new logging --- __init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index 4880e13..af18a87 100644 --- a/__init__.py +++ b/__init__.py @@ -28,8 +28,11 @@ import io import logging from PIL import Image, ImageEnhance, ExifTags -logger_name = 'MEDIA' -logger = logging.getLogger(logger_name) +try: + from config import APP_NAME as ROOT_LOGGER_NAME +except ImportError: + ROOT_LOGGER_NAME = 'root' +logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__) __DESCRIPTION__ = """The Module {\\tt %s} is designed to help on all issues with media files, like tags (e.g. exif, id3) and transformations.