public interface LoggerHandler extends Handler<RoutingContext>
Modifier and Type | Field and Description |
---|---|
static LoggerFormat |
DEFAULT_FORMAT |
Modifier and Type | Method and Description |
---|---|
static LoggerHandler |
create()
Create a handler with default format
|
static LoggerHandler |
create(boolean immediate,
LoggerFormat format)
Create a handler with he specified format
|
static LoggerHandler |
create(LoggerFormat format)
Create a handler with he specified format
|
LoggerHandler |
customFormatter(java.util.function.Function<HttpServerRequest,String> formatter)
Set the custom formatter to be used by the handler.
|
static final LoggerFormat DEFAULT_FORMAT
static LoggerHandler create()
static LoggerHandler create(LoggerFormat format)
format
- the formatstatic LoggerHandler create(boolean immediate, LoggerFormat format)
immediate
- true if logging should occur as soon as request arrivesformat
- the formatLoggerHandler customFormatter(java.util.function.Function<HttpServerRequest,String> formatter)
formatter
- the formatting functionIllegalStateException
- if current format is not LoggerFormat.CUSTOM
Copyright © 2021 Eclipse. All rights reserved.