Package io.vertx.mutiny.ext.web.handler
Class LoggerHandler
java.lang.Object
io.vertx.mutiny.ext.web.handler.LoggerHandler
- All Implemented Interfaces:
MutinyDelegate
,io.vertx.core.Handler<RoutingContext>
,PlatformHandler
,Consumer<RoutingContext>
public class LoggerHandler
extends Object
implements MutinyDelegate, PlatformHandler, io.vertx.core.Handler<RoutingContext>, Consumer<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
NOTE: This class has been automatically generated from the
original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeArg<LoggerHandler>
static final io.vertx.ext.web.handler.LoggerFormat
-
Constructor Summary
ConstructorsConstructorDescriptionLoggerHandler
(io.vertx.ext.web.handler.LoggerHandler delegate) LoggerHandler
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(RoutingContext item) static LoggerHandler
create()
static LoggerHandler
create
(boolean immediate, io.vertx.ext.web.handler.LoggerFormat format) static LoggerHandler
create
(io.vertx.ext.web.handler.LoggerFormat format) customFormatter
(LoggerFormatter formatter) customFormatter
(Function<HttpServerRequest, String> formatter) Deprecated.boolean
io.vertx.ext.web.handler.LoggerHandler
void
handle
(RoutingContext arg0) int
hashCode()
static LoggerHandler
newInstance
(io.vertx.ext.web.handler.LoggerHandler arg) toString()
-
Field Details
-
__TYPE_ARG
-
DEFAULT_FORMAT
public static final io.vertx.ext.web.handler.LoggerFormat DEFAULT_FORMAT
-
-
Constructor Details
-
LoggerHandler
public LoggerHandler(io.vertx.ext.web.handler.LoggerHandler delegate) -
LoggerHandler
-
-
Method Details
-
getDelegate
public io.vertx.ext.web.handler.LoggerHandler getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Specified by:
getDelegate
in interfacePlatformHandler
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
handle
- Specified by:
handle
in interfaceio.vertx.core.Handler<RoutingContext>
- Specified by:
handle
in interfacePlatformHandler
-
create
- Returns:
- the handler
-
create
- Parameters:
format
- the format- Returns:
- the handler
-
create
- Parameters:
immediate
- true if logging should occur as soon as request arrivesformat
- the format- Returns:
- the handler
-
customFormatter
Deprecated.Superseded bycustomFormatter(LoggerFormatter)
- Parameters:
formatter
- the formatting function- Returns:
- the formatted log string
-
customFormatter
- Parameters:
formatter
- the formatter- Returns:
- the formatted log string
-
accept
- Specified by:
accept
in interfaceConsumer<RoutingContext>
- Specified by:
accept
in interfacePlatformHandler
-
newInstance
-
customFormatter(LoggerFormatter)