From 2fad968a8dc75edf67d5be1195cad10a1a706366 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Tue, 22 Dec 2020 08:00:08 +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 03efd43..644fef1 100644 --- a/__init__.py +++ b/__init__.py @@ -32,8 +32,11 @@ import select import sys import time -logger_name = 'KEYBOARD' -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 fetch data from a keyboatd (e.g. RFID-Reader). For more Information read the sphinx documentation.""" % __name__.replace('_', '\_')