File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,11 @@ public final class LambdaRuntime<Handler>: @unchecked Sendable where Handler: St
4646 // developers have to wait for AWS Lambda to dispose and recreate a runtime environment to pickup a change
4747 // this approach is less flexible but more performant than reading the value of the environment variable at each invocation
4848 var log = logger
49- log. logLevel = Lambda . env ( " LOG_LEVEL " ) . flatMap ( Logger . Level. init) ?? . info
49+
50+ // use the LOG_LEVEL environment variable to set the log level.
51+ // if the environment variable is not set, use the default log level from the logger provided
52+ log. logLevel = Lambda . env ( " LOG_LEVEL " ) . flatMap ( Logger . Level. init) ?? logger. logLevel
53+
5054 self . logger = log
5155 self . logger. debug ( " LambdaRuntime initialized " )
5256 }
You can’t perform that action at this time.
0 commit comments