feat(TALE-33): add debug logging with DEBUG env
This commit is contained in:
parent
1d821251a9
commit
1d6066d3f0
8 changed files with 88 additions and 6 deletions
|
|
@ -10,6 +10,12 @@ export default {
|
|||
error: (category: string, message: string, ...args: unknown[]) => {
|
||||
defaultLog('ERRO', category, message, ...args)
|
||||
},
|
||||
|
||||
debug: (category: string, message: string, ...args: unknown[]) => {
|
||||
if (process.env.DEBUG === 'true') {
|
||||
defaultLog('DEBG', category, message, ...args)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function defaultLog(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue