From aa0b039349462bd31a07e78c89a3e09f86ce52b3 Mon Sep 17 00:00:00 2001 From: Onkel Andy Date: Thu, 6 Jul 2023 22:36:33 +0200 Subject: [PATCH] stateengine plugin: (re)introduce separate loggers for each stateengine item. Custom logger stateengine..rules --- stateengine/StateEngineLogger.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stateengine/StateEngineLogger.py b/stateengine/StateEngineLogger.py index 701f39ae9..8ce03712d 100755 --- a/stateengine/StateEngineLogger.py +++ b/stateengine/StateEngineLogger.py @@ -102,7 +102,8 @@ def create(item): # Constructor # item: item for which the detailed log is (used as part of file name) def __init__(self, item): - self.logger = StateEngineDefaults.se_logger + #self.logger = StateEngineDefaults.se_logger + self.logger = logging.getLogger('stateengine.{}'.format(item.property.path)) self.__section = item.property.path.replace(".", "_").replace("/", "") self.__indentlevel = 0 self.__loglevel = StateEngineDefaults.log_level