chore(logging): add informational logs for SceneMgr and Scene initialization

This commit is contained in:
Christian Weimann
2025-01-12 06:58:43 +01:00
parent 0c5566a7eb
commit 2571f9c01e

View File

@@ -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();