Skip to content

Commit

Permalink
fix: respect level when using logger type env var
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thsig committed Mar 11, 2019
1 parent 1d0d739 commit c5a5d6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion garden-service/src/logger/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c5a5d6b

Please sign in to comment.