From 2571f9c01ed0021ef58a1d9f654cd7c2ace9fc56 Mon Sep 17 00:00:00 2001 From: Christian Weimann Date: Sun, 12 Jan 2025 06:58:43 +0100 Subject: [PATCH] chore(logging): add informational logs for SceneMgr and Scene initialization --- SceneMgr.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SceneMgr.js b/SceneMgr.js index 078d363..f131941 100644 --- a/SceneMgr.js +++ b/SceneMgr.js @@ -16,6 +16,8 @@ const tm = new TimerMgr(); class SceneMgr { constructor() { + log.info('Initialization of SceneMgr'); + this.scenes = this.getScenes().reduce((accumulator, scene) => { const sceneUID = scene.getUID(); accumulator[sceneUID] = new Scene(scene); @@ -70,6 +72,8 @@ class Scene { this.sceneSwitchItemName = ITEMPREFIX + "_" + this.sceneUID; this.evaluationRuleUID = "SceneItems" + this.sceneUID; + log.info(`Initialize scene ${this.sceneName}`); + if (!items[this.sceneSwitchItemName]) { this.createSceneSwitchItem(); } @@ -254,7 +258,7 @@ const sm = new SceneMgr(); // Unload script require('@runtime').lifecycleTracker.addDisposeHook(() => { - log.info('Deinitialization of SceneMgr.js'); + log.info('Deinitialization of SceneMgr'); sm.purgeUnusedSceneSwitchItems();