check debug env to show debug logs

This commit is contained in:
Dmitriy Pleshevskiy 2022-06-08 23:31:59 +03:00
parent cd91329be0
commit 8409d472bf
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

3
log.ts
View file

@ -3,5 +3,8 @@ export function info(...args: unknown[]): void {
}
export function debug(...args: unknown[]): void {
// choose better name for this env
if (Deno.env.get("DEBUG") === "1") {
console.log("[DEBUG]", ...args);
}
}