Classvapor 4.114.1Vapor
RouteLoggingMiddleware
Emits a log message containing the request method and path to a Request
’s logger. The log level of the message is configurable.
final class RouteLoggingMiddleware
Emits a log message containing the request method and path to a Request
’s logger. The log level of the message is configurable.
final class RouteLoggingMiddleware
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
@preconcurrency protocol Middleware : Sendable
Middleware
is placed between the server and your router. It is capable of mutating both incoming requests and outgoing responses. Middleware
can choose to pass requests on to the next Middleware
in a chain, or they can short circuit and return a custom Response
if desired.
protocol Sendable
init(logLevel: Logger.Level = .info)
let logLevel: Logger.Level
func respond(to request: Request, chainingTo next: Responder) -> EventLoopFuture<Response>
func makeResponder(chainingTo responder: Responder) -> Responder
Wraps a Responder
in a single Middleware
creating a new Responder
.