Class LoggerHandler
java.lang.Object
io.vertx.rxjava3.ext.web.handler.LoggerHandler
- All Implemented Interfaces:
Handler<RoutingContext>, io.vertx.lang.rx.RxDelegate, PlatformHandler
public class LoggerHandler
extends Object
implements io.vertx.lang.rx.RxDelegate, PlatformHandler, Handler<RoutingContext>
A handler which logs request information to the Vert.x logger.
You should mount this handler before any handler that could fail the routing context.
Logs will be produced with the appropriate severity level depending on the status code of the response.
To capture the logs configure the logger in your logging configuration with the name:
io.vertx.ext.web.handler.LoggerHandler.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.vertx.lang.rx.TypeArg<LoggerHandler> static final LoggerFormat -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LoggerHandlercreate()Create a handler with default formatstatic LoggerHandlercreate(boolean immediate, LoggerFormat format) Create a handler with he specified formatstatic LoggerHandlercreate(LoggerFormat format) Create a handler with he specified formatcustomFormatter(LoggerFormatter formatter) Set the custom formatter to be used by the handler.booleanvoidhandle(RoutingContext event) Something has happened, so handle it.inthashCode()static LoggerHandlernewInstance(LoggerHandler arg) toString()
-
Field Details
-
__TYPE_ARG
-
DEFAULT_FORMAT
-
-
Constructor Details
-
LoggerHandler
-
LoggerHandler
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfacePlatformHandler- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
handle
Something has happened, so handle it.- Specified by:
handlein interfaceHandler<RoutingContext>- Specified by:
handlein interfacePlatformHandler- Parameters:
event- the event to handle
-
create
-
create
Create a handler with he specified format- Parameters:
format- the format- Returns:
- the handler
-
create
Create a handler with he specified format- Parameters:
immediate- true if logging should occur as soon as request arrivesformat- the format- Returns:
- the handler
-
customFormatter
Set the custom formatter to be used by the handler.- Parameters:
formatter- the formatter- Returns:
- the formatted log string
-
newInstance
-