From f69f7430667be0f34ab75b82e8ceac8536519275 Mon Sep 17 00:00:00 2001 From: Gabriel Del Nero <43073074+Gabixel@users.noreply.github.com> Date: Tue, 14 Mar 2023 16:21:24 +0100 Subject: [PATCH] Add missing constructors logging and print them as debug --- src/ts/grid/ButtonFilterer.ts | 2 +- src/ts/grid/ButtonSwap.ts | 2 +- src/ts/grid/GridManager.ts | 9 ++++++--- src/ts/grid/GridResizer.ts | 6 +++++- src/ts/grid/SoundButtonManager.ts | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/ts/grid/ButtonFilterer.ts b/src/ts/grid/ButtonFilterer.ts index 19ef7d2c..afba871e 100644 --- a/src/ts/grid/ButtonFilterer.ts +++ b/src/ts/grid/ButtonFilterer.ts @@ -26,7 +26,7 @@ class ButtonFilterer extends Logger { this._gridManager = gridManager; - ButtonFilterer.logInfo(null, "Initialized!"); + ButtonFilterer.logDebug(null, "Initialized!"); } public setupInputs( diff --git a/src/ts/grid/ButtonSwap.ts b/src/ts/grid/ButtonSwap.ts index 0f425b8d..202c3f46 100644 --- a/src/ts/grid/ButtonSwap.ts +++ b/src/ts/grid/ButtonSwap.ts @@ -27,7 +27,7 @@ class ButtonSwap extends Logger { this.initDocumentEvents(); this.setMouseDrag_1(); - ButtonSwap.logInfo(null, "Initialized!"); + ButtonSwap.logDebug(null, "Initialized!"); } private mouseDrag_1 = (e: JQuery.MouseMoveEvent): void => { diff --git a/src/ts/grid/GridManager.ts b/src/ts/grid/GridManager.ts index 1b52c1e2..3ac10cf6 100644 --- a/src/ts/grid/GridManager.ts +++ b/src/ts/grid/GridManager.ts @@ -51,19 +51,22 @@ class GridManager extends Logger { super(); this._$grid = $grid; - GridManager.logInfo(null, "Initialized!"); + GridManager.logDebug(null, "Initialized!"); } public setRows(newValue: number): void { this._gridRows = newValue; - GridManager.logDebug(this.setRows, `Row size changed (${this._gridRows})`); + GridManager.logInfo(this.setRows, `Row size changed (${this._gridRows})`); } public setColumns(newValue: number): void { this._gridCols = newValue; - GridManager.logDebug(this.setColumns, `Column size changed (${this._gridCols})`); + GridManager.logInfo( + this.setColumns, + `Column size changed (${this._gridCols})` + ); } public resetSoundButtonCount(): void { diff --git a/src/ts/grid/GridResizer.ts b/src/ts/grid/GridResizer.ts index 46cb04e8..af3e0d14 100644 --- a/src/ts/grid/GridResizer.ts +++ b/src/ts/grid/GridResizer.ts @@ -1,7 +1,7 @@ /** * Resize (rescale) logic for the {@link GridManager} */ -class GridResizer { +class GridResizer extends Logger { private _gridManager: GridManager; private _buttonFilterer: ButtonFilterer; private _soundButtonManager: SoundButtonManager; @@ -13,9 +13,13 @@ class GridResizer { soundButtonManager: SoundButtonManager, buttonFilterer: ButtonFilterer ) { + super(); + this._gridManager = gridManager; this._buttonFilterer = buttonFilterer; this._soundButtonManager = soundButtonManager; + + GridResizer.logDebug(null, "Initialized!"); } /** diff --git a/src/ts/grid/SoundButtonManager.ts b/src/ts/grid/SoundButtonManager.ts index 7b245d48..88ae78f4 100644 --- a/src/ts/grid/SoundButtonManager.ts +++ b/src/ts/grid/SoundButtonManager.ts @@ -36,7 +36,7 @@ class SoundButtonManager extends Logger { this._$grid = $grid; - SoundButtonManager.logInfo(null, "Initialized!"); + SoundButtonManager.logDebug(null, "Initialized!"); } public generateButton(