From 53e9e080f8f19c068135a67ede6ac736ba3bf94c Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Mon, 21 Dec 2020 01:05:32 +0100 Subject: [PATCH] Adaption to new logging --- __init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index a51e5a6..68c157c 100644 --- a/__init__.py +++ b/__init__.py @@ -3,8 +3,12 @@ import numbers import os import time -logger_name = 'HELPERS' -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__) class continues_statistic(dict):