diff options
Diffstat (limited to 'ext/node/polyfills/internal/util')
-rw-r--r-- | ext/node/polyfills/internal/util/debuglog.ts | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/ext/node/polyfills/internal/util/debuglog.ts b/ext/node/polyfills/internal/util/debuglog.ts index 3cbcf2c5c..9bbaed606 100644 --- a/ext/node/polyfills/internal/util/debuglog.ts +++ b/ext/node/polyfills/internal/util/debuglog.ts @@ -12,7 +12,7 @@ let debugImpls: Record<string, (...args: unknown[]) => void>; let testEnabled: (str: string) => boolean; // `debugEnv` is initial value of process.env.NODE_DEBUG -function initializeDebugEnv(debugEnv: string) { +export function initializeDebugEnv(debugEnv: string) { debugImpls = Object.create(null); if (debugEnv) { // This is run before any user code, it's OK not to use primordials. @@ -106,20 +106,4 @@ export function debuglog( return logger; } -let debugEnv; -/* TODO(kt3k): enable initializing debugEnv. -It's not possible to access env var when snapshotting. - -try { - debugEnv = Deno.env.get("NODE_DEBUG") ?? ""; -} catch (error) { - if (error instanceof Deno.errors.PermissionDenied) { - debugEnv = ""; - } else { - throw error; - } -} -*/ -initializeDebugEnv(debugEnv); - export default { debuglog }; |