improve logging
This commit is contained in:
@ -12,7 +12,7 @@ export const log = {
|
||||
console.debug(new Date().toISOString(), ...params);
|
||||
},
|
||||
debug: (...params: any[]) => {
|
||||
if (!DEV) {
|
||||
if (!log.isDebugEnabled()) {
|
||||
return;
|
||||
}
|
||||
console.debug(new Date().toISOString(), ...params);
|
||||
@ -28,5 +28,8 @@ export const log = {
|
||||
},
|
||||
error: (...params: any[]) => {
|
||||
console.error(new Date().toISOString(), ...params);
|
||||
},
|
||||
isDebugEnabled: (): boolean => {
|
||||
return DEV;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user