Skip to content

Commit 1f0888e

Browse files
authored
Fix after release of swift-log 1.8.0 (#619)
<!--- Provide a general summary of your changes in the Title above --> Fix after release of swift-log 1.8.0 ## Issue \# <!--- If it fixes an issue, please link to the issue here --> ## Description of changes <!--- Why is this change required? What problem does it solve? --> ## New/existing dependencies impact assessment, if applicable <!--- No new dependencies were added to this change. --> <!--- If any dependency was added / modified / removed, THIRD-PARTY-LICENSES must be updated accordingly. --> ## Conventional Commits <!--- Please use conventional commits to let us know what kind of change this is.--> <!--- More info can be found here: https://www.conventionalcommits.org/en/v1.0.0/--> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 4494361 commit 1f0888e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/AWSLambdaRuntime/LambdaRuntime.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public final class LambdaRuntime<Handler>: Sendable where Handler: StreamingLamb
4747

4848
// use the LOG_LEVEL environment variable to set the log level.
4949
// if the environment variable is not set, use the default log level from the logger provided
50-
log.logLevel = Lambda.env("LOG_LEVEL").flatMap(Logger.Level.init) ?? logger.logLevel
50+
log.logLevel = Lambda.env("LOG_LEVEL").flatMap { .init(rawValue: $0) } ?? logger.logLevel
5151

5252
self.logger = log
5353
self.logger.debug("LambdaRuntime initialized")

Sources/MockServer/MockHTTPServer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct HttpServer {
4444

4545
static func main() async throws {
4646
var log = Logger(label: "MockServer")
47-
log.logLevel = env("LOG_LEVEL").flatMap(Logger.Level.init) ?? .info
47+
log.logLevel = env("LOG_LEVEL").flatMap { .init(rawValue: $0) } ?? .info
4848

4949
let server = HttpServer(
5050
host: env("HOST") ?? "127.0.0.1",

0 commit comments

Comments
 (0)