mirror of
https://github.com/swift-server/swift-aws-lambda-runtime.git
synced 2026-05-03 07:22:27 +00:00
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.
This commit is contained in:
@@ -47,7 +47,7 @@ public final class LambdaRuntime<Handler>: Sendable where Handler: StreamingLamb
|
||||
|
||||
// use the LOG_LEVEL environment variable to set the log level.
|
||||
// if the environment variable is not set, use the default log level from the logger provided
|
||||
log.logLevel = Lambda.env("LOG_LEVEL").flatMap(Logger.Level.init) ?? logger.logLevel
|
||||
log.logLevel = Lambda.env("LOG_LEVEL").flatMap { .init(rawValue: $0) } ?? logger.logLevel
|
||||
|
||||
self.logger = log
|
||||
self.logger.debug("LambdaRuntime initialized")
|
||||
|
||||
@@ -44,7 +44,7 @@ struct HttpServer {
|
||||
|
||||
static func main() async throws {
|
||||
var log = Logger(label: "MockServer")
|
||||
log.logLevel = env("LOG_LEVEL").flatMap(Logger.Level.init) ?? .info
|
||||
log.logLevel = env("LOG_LEVEL").flatMap { .init(rawValue: $0) } ?? .info
|
||||
|
||||
let server = HttpServer(
|
||||
host: env("HOST") ?? "127.0.0.1",
|
||||
|
||||
Reference in New Issue
Block a user