Skip to content

Commit a742c8f

Browse files
committed
move logger to last arg
1 parent b15497d commit a742c8f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/AWSLambdaRuntime/FoundationSupport/Lambda+JSON.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ extension LambdaCodableAdapter {
8787
extension LambdaRuntime {
8888
/// Initialize an instance with a `LambdaHandler` defined in the form of a closure **with a non-`Void` return type**.
8989
/// - Parameters:
90-
/// - logger: The logger to use for the runtime. Defaults to a logger with label "LambdaRuntime".
9190
/// - decoder: The decoder object that will be used to decode the incoming `ByteBuffer` event into the generic `Event` type. `JSONDecoder()` used as default.
9291
/// - encoder: The encoder object that will be used to encode the generic `Output` into a `ByteBuffer`. `JSONEncoder()` used as default.
92+
/// - logger: The logger to use for the runtime. Defaults to a logger with label "LambdaRuntime".
9393
/// - body: The handler in the form of a closure.
9494
public convenience init<Event: Decodable, Output>(
95-
logger: Logger = Logger(label: "LambdaRuntime"),
9695
decoder: JSONDecoder = JSONDecoder(),
9796
encoder: JSONEncoder = JSONEncoder(),
97+
logger: Logger = Logger(label: "LambdaRuntime"),
9898
body: sending @escaping (Event, LambdaContext) async throws -> Output
9999
)
100100
where
@@ -116,12 +116,12 @@ extension LambdaRuntime {
116116
}
117117

118118
/// Initialize an instance with a `LambdaHandler` defined in the form of a closure **with a `Void` return type**.
119-
/// - Parameter logger: The logger to use for the runtime. Defaults to a logger with label "LambdaRuntime".
120119
/// - Parameter body: The handler in the form of a closure.
121120
/// - Parameter decoder: The decoder object that will be used to decode the incoming `ByteBuffer` event into the generic `Event` type. `JSONDecoder()` used as default.
121+
/// - Parameter logger: The logger to use for the runtime. Defaults to a logger with label "LambdaRuntime".
122122
public convenience init<Event: Decodable>(
123-
logger: Logger = Logger(label: "LambdaRuntime"),
124123
decoder: JSONDecoder = JSONDecoder(),
124+
logger: Logger = Logger(label: "LambdaRuntime"),
125125
body: sending @escaping (Event, LambdaContext) async throws -> Void
126126
)
127127
where

0 commit comments

Comments
 (0)