AWSLoggingMiddleware
public struct AWSLoggingMiddleware : AWSServiceMiddleware
Middleware struct that outputs the contents of requests being sent to AWS and the bodies of the responses received
-
initialize AWSLoggingMiddleware
Declaration
Swift
public init(log: @escaping (String) -> Void = { print($0) })
Parameters
log
Function to call with logging output
-
initialize AWSLoggingMiddleware to use Logger
Declaration
Swift
public init(logger: Logger, logLevel: Logger.Level = .info)
Parameters
logger
Logger to use
logLevel
Log level to output at
-
output request
Declaration
Swift
public func chain(request: AWSRequest, context: AWSMiddlewareContext) throws -> AWSRequest
-
output response
Declaration
Swift
public func chain(response: AWSResponse, context: AWSMiddlewareContext) throws -> AWSResponse