From c5a5d6b5d028901b270cb6e0d4eddce7c3c34920 Mon Sep 17 00:00:00 2001 From: Thorarinn Sigurdsson Date: Mon, 11 Mar 2019 19:07:13 +0100 Subject: [PATCH] fix: respect level when using logger type env var Before this commit, the log level passed to a command with -l/--logLevel was ignored when used in conjunction with the GARDEN_LOGGER_TYPE env var. --- garden-service/src/logger/logger.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/garden-service/src/logger/logger.ts b/garden-service/src/logger/logger.ts index e367df05ba..e03b4a806a 100644 --- a/garden-service/src/logger/logger.ts +++ b/garden-service/src/logger/logger.ts @@ -87,7 +87,7 @@ export class Logger extends LogNode { }) } - instance = new Logger(getCommonConfig(loggerType)) + instance = new Logger({ ...getCommonConfig(loggerType), level: config.level }) instance.debug(`Setting logger type to ${loggerType} (from GARDEN_LOGGER_TYPE)`) } else { instance = new Logger(config)