Type Aliassoto-core 7.4.0SotoCore
LoggingFunction
LoggingMiddleware.swift:24typealias LoggingFunction = (String) -> Void
typealias LoggingFunction = (String) -> Void
import SotoCore
struct AWSLoggingMiddleware
Middleware that outputs the contents of requests being sent to AWS and the contents of the responses received.
@frozen struct String
A Unicode string value that is a collection of characters.
typealias Void = ()
The return type of functions that don’t explicitly specify a return type, that is, an empty tuple ()
.
init(log: @escaping LoggingFunction = { print($0) })
initialize AWSLoggingMiddleware
init(logger: Logger, logLevel: Logger.Level = .info)
initialize AWSLoggingMiddleware to use Logger
func handle(_ request: AWSHTTPRequest, context: AWSMiddlewareContext, next: AWSMiddlewareNextHandler) async throws -> AWSHTTPResponse