This repository was archived by the owner on Jul 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ class Log implements LogInterface {
2626 private constructor ( ) {
2727 this . isDebugModeEnabled = false ;
2828 this . levelInfo = 0 ;
29+ this . configureLogger ( ) ;
30+
2931 }
3032
3133 public setDebugMode ( isDebugModeEnabled : boolean ) {
@@ -41,31 +43,31 @@ class Log implements LogInterface {
4143
4244 private configureLogger ( ) {
4345 if ( this . levelInfo >= LevelInfoRecord . debug && this . isDebugModeEnabled ) {
44- this . debug = console . log . bind ( window . console , `[DEBUG]` ) ;
46+ this . debug = console . log . bind ( console , `[DEBUG]` ) ;
4547 } else {
4648 this . debug = ( ) => {
4749 // Disable debug mode
4850 } ;
4951 }
5052
5153 if ( this . levelInfo >= LevelInfoRecord . info && this . isDebugModeEnabled ) {
52- this . info = console . log . bind ( window . console , `[INFO]` ) ;
54+ this . info = console . log . bind ( console , `[INFO]` ) ;
5355 } else {
5456 this . info = ( ) => {
5557 // Disable info mode
5658 } ;
5759 }
5860
5961 if ( this . levelInfo >= LevelInfoRecord . warn && this . isDebugModeEnabled ) {
60- this . warn = console . log . bind ( window . console , `[WARN]` ) ;
62+ this . warn = console . log . bind ( console , `[WARN]` ) ;
6163 } else {
6264 this . warn = ( ) => {
6365 // Disable warn mode
6466 } ;
6567 }
6668
6769 if ( this . levelInfo >= LevelInfoRecord . error && this . isDebugModeEnabled ) {
68- this . error = console . log . bind ( window . console , `[ERROR]` ) ;
70+ this . error = console . log . bind ( console , `[ERROR]` ) ;
6971 } else {
7072 this . error = ( ) => {
7173 // Disable error mode
You can’t perform that action at this time.
0 commit comments