@ChannelHandler.Sharable
public class HttpAccessLogHandler
extends io.netty.channel.ChannelDuplexHandler
Modifier and Type | Field and Description |
---|---|
static String |
HTTP_ACCESS_LOGGER
The default logger name.
|
Constructor and Description |
---|
HttpAccessLogHandler(org.slf4j.Logger logger,
String spec)
Creates a HttpAccessLogHandler.
|
HttpAccessLogHandler(org.slf4j.Logger logger,
String spec,
Predicate<String> uriInclusion)
Creates a HttpAccessLogHandler.
|
HttpAccessLogHandler(String loggerName,
String spec)
Creates a HttpAccessLogHandler.
|
HttpAccessLogHandler(String loggerName,
String spec,
Predicate<String> uriInclusion)
Creates a HttpAccessLogHandler.
|
Modifier and Type | Method and Description |
---|---|
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise) |
bind, close, connect, deregister, disconnect, flush, read
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public static final String HTTP_ACCESS_LOGGER
public HttpAccessLogHandler(String loggerName, String spec)
loggerName
- A logger name.spec
- The log format specification.public HttpAccessLogHandler(String loggerName, String spec, Predicate<String> uriInclusion)
loggerName
- A logger name.spec
- The log format specification.uriInclusion
- A filtering Predicate that will be checked per URI.public HttpAccessLogHandler(org.slf4j.Logger logger, String spec)
logger
- A logger. Will log at info level.spec
- The log format specification.public HttpAccessLogHandler(org.slf4j.Logger logger, String spec, Predicate<String> uriInclusion)
logger
- A logger. Will log at info level.spec
- The log format specification.uriInclusion
- A filtering Predicate that will be checked per URI.public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws io.netty.handler.codec.http2.Http2Exception
channelRead
in interface io.netty.channel.ChannelInboundHandler
channelRead
in class io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.codec.http2.Http2Exception