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('_', '\_')