mirror of
https://github.com/tale/headplane.git
synced 2026-08-29 00:17:13 +00:00
feat(TALE-33): add debug logging with DEBUG env
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user