From 1beb50c90cccf722e9926aecd0ed1b0734471d98 Mon Sep 17 00:00:00 2001 From: Cristian Dominguez Date: Thu, 26 Oct 2023 19:20:01 -0300 Subject: [PATCH] fix(debug): set default log level --- src/flags.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/flags.ts b/src/flags.ts index d45b0516..125fdfb8 100644 --- a/src/flags.ts +++ b/src/flags.ts @@ -31,6 +31,11 @@ export function preprocessCliFlags(process: ProcessLike): void { process.env.SF_DEBUG = '1'; process.env.SF_ENV = 'development'; + // set `SF_LOG_LEVEL` to `trace` if it wasn't specified + if (process.env.SF_LOG_LEVEL === undefined) { + process.env.SF_LOG_LEVEL = 'trace'; + } + // need to calculate indexOf --dev-debug here because it might've changed based on --debug-filter process.argv.splice(process.argv.indexOf('--dev-debug'), 1); }