refactor debug logging, add debug info for YT authorized tokens
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { DEBUG_LOG } from '$env/static/private';
|
||||
import { env } from '$env/dynamic/private';
|
||||
import { isTruthy } from '$lib/truthyString';
|
||||
const { DEV } = import.meta.env;
|
||||
@@ -41,7 +42,7 @@ export class Logger {
|
||||
public constructor(private name: string) {}
|
||||
|
||||
public static isDebugEnabled(): boolean {
|
||||
return DEV || enableVerboseLog;
|
||||
return !!DEBUG_LOG || DEV || enableVerboseLog;
|
||||
}
|
||||
public verbose(...params: any[]) {
|
||||
if (!enableVerboseLog) {
|
||||
@@ -50,7 +51,7 @@ export class Logger {
|
||||
console.debug(new Date().toISOString(), `- ${this.name} -`, ...params);
|
||||
}
|
||||
public debug(...params: any[]) {
|
||||
if (false && !Logger.isDebugEnabled()) {
|
||||
if (!Logger.isDebugEnabled()) {
|
||||
return;
|
||||
}
|
||||
console.debug(new Date().toISOString(), `- ${this.name} -`, ...params);
|
||||
|
Reference in New Issue
Block a user