Initializersoto-core 7.4.0SotoCore
init(log:)
initialize AWSLoggingMiddleware
init(log: @escaping LoggingFunction = { print($0) })
Parameters
- log
Function to call with logging output
initialize AWSLoggingMiddleware
init(log: @escaping LoggingFunction = { print($0) })
Function to call with logging output
import SotoCore
struct AWSLoggingMiddleware
Middleware that outputs the contents of requests being sent to AWS and the contents of the responses received.
typealias LoggingFunction = (String) -> Void
init(logger: Logger, logLevel: Logger.Level = .info)
initialize AWSLoggingMiddleware to use Logger
func handle(_ request: AWSHTTPRequest, context: AWSMiddlewareContext, next: AWSMiddlewareNextHandler) async throws -> AWSHTTPResponse