You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[core] Give user the possibility to pass their logger to the lambda runtime (#523)
Allow user to give their logger to the LambdaRuntime.
### Motivation:
Overloaded versions of `LambdaRuntime.init` don't allow to pass a logger
### Modifications:
Add a `logger` parameter to overloaded versions of `LambdaRuntime.init`
### Result:
It is now possible to write
```
let runtime = LambdaRuntime(logger: Logger(label: "MyLogger"), body: handler)
```
/// - decoder: The decoder object that will be used to decode the incoming `ByteBuffer` event into the generic `Event` type. `JSONDecoder()` used as default.
89
91
/// - 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".
/// Initialize an instance with a `LambdaHandler` defined in the form of a closure **with a `Void` return type**.
115
119
/// - Parameter body: The handler in the form of a closure.
116
120
/// - 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".
0 commit comments