@ChannelHandler.Sharable
public class HttpAccessLogHandler
extends io.netty.channel.ChannelDuplexHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HTTP_ACCESS_LOGGER
The default logger name.
|
Constructor and Description |
---|
HttpAccessLogHandler(org.slf4j.Logger logger,
java.lang.String spec)
Creates a HttpAccessLogHandler.
|
HttpAccessLogHandler(java.lang.String loggerName,
java.lang.String spec)
Creates a HttpAccessLogHandler.
|
Modifier and Type | Method and Description |
---|---|
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg) |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.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 java.lang.String HTTP_ACCESS_LOGGER
public HttpAccessLogHandler(java.lang.String loggerName, java.lang.String spec)
loggerName
- A logger name.spec
- The log format specification.public HttpAccessLogHandler(org.slf4j.Logger logger, java.lang.String spec)
logger
- A logger. Will log at info level.spec
- The log format specification.public void channelRead(io.netty.channel.ChannelHandlerContext ctx, java.lang.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
public void write(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg, io.netty.channel.ChannelPromise promise) throws java.lang.Exception
write
in interface io.netty.channel.ChannelOutboundHandler
write
in class io.netty.channel.ChannelDuplexHandler
java.lang.Exception