From bc7c7ee1118a259ceaa1be1dade90f2f9ccf9e1d Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Wed, 3 Jan 2024 21:27:47 +0330 Subject: [PATCH] feat(logger): Update debugMode to enabled by default in development mode --- packages/logger/src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/logger/src/main.ts b/packages/logger/src/main.ts index f8da2947..a7852117 100644 --- a/packages/logger/src/main.ts +++ b/packages/logger/src/main.ts @@ -2,7 +2,7 @@ import {platformInfo} from '@alwatr/platform-info'; import type {AlwatrLogger} from './type.js'; -export const debugMode = platformInfo.isCli +export const debugMode = platformInfo.development || platformInfo.isCli ? process.env.DEBUG !== undefined && process.env.DEBUG !== '' : typeof localStorage !== 'undefined' && localStorage.getItem('debug') === '1';