Skip to content

Commit

Permalink
fix(aws-lambda): respect INSTANA_LOG_LEVEL (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirrg001 authored Jan 16, 2023
1 parent 4044eba commit 8c00a0c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/aws-lambda/src/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ function init(event, arnInfo, _config) {

if (config.logger) {
logger = config.logger;
} else if (process.env.INSTANA_DEBUG || config.level || process.env.INSTANA_LOG_LEVEL) {
} else {
config.logger = logger;
}

if (process.env.INSTANA_DEBUG || config.level || process.env.INSTANA_LOG_LEVEL) {
logger.setLevel(process.env.INSTANA_DEBUG ? 'debug' : config.level || process.env.INSTANA_LOG_LEVEL);
}

Expand Down

0 comments on commit 8c00a0c

Please sign in to comment.