chore(logging): add informational logs for SceneMgr and Scene initialization
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user