-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add logger class and replace it * add enable/disable on logger
- Loading branch information
1 parent
7be7ea7
commit fc99f34
Showing
7 changed files
with
101 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
let isDebug = false; | ||
|
||
export function enable() { | ||
isDebug = true; | ||
} | ||
|
||
export function disable() { | ||
isDebug = false; | ||
} | ||
|
||
export function debug(msg) { | ||
isDebug && console.debug(msg); | ||
} | ||
|
||
export function info(msg) { | ||
isDebug && console.info(msg); | ||
} | ||
|
||
export function log(msg) { | ||
isDebug && console.log(msg); | ||
} | ||
|
||
export function warn(msg) { | ||
isDebug && console.warn(msg); | ||
} | ||
|
||
export function error(msg) { | ||
isDebug && console.error(msg); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.