Class AccessLog
- java.lang.Object
-
- io.micronaut.http.server.netty.handler.accesslog.element.AccessLog
-
public class AccessLog extends java.lang.ObjectAn Access log instance.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidlog(org.slf4j.Logger accessLogger)Logs at info level the accumulated values.voidonLastResponseWrite(int bytesSent)Triggers LogElements for the ON_LAST_RESPONSE_WRITE event.voidonRequestHeaders(io.netty.channel.socket.SocketChannel channel, java.lang.String method, io.netty.handler.codec.http.HttpHeaders headers, java.lang.String uri, java.lang.String protocol)Triggers LogElements for the ON_REQUEST_HEADERS event.voidonResponseHeaders(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpHeaders headers, java.lang.String status)Triggers LogElements for the ON_RESPONSE_HEADERS event.voidonResponseWrite(int bytesSent)Triggers LogElements for the ON_RESPONSE_WRITE event.voidreset()Resets the current values.
-
-
-
Method Detail
-
reset
public void reset()
Resets the current values.
-
onRequestHeaders
public void onRequestHeaders(io.netty.channel.socket.SocketChannel channel, java.lang.String method, io.netty.handler.codec.http.HttpHeaders headers, java.lang.String uri, java.lang.String protocol)Triggers LogElements for the ON_REQUEST_HEADERS event.- Parameters:
channel- The socket channel.method- The http method.headers- The request headers.uri- The uri.protocol- The protocol.
-
onResponseHeaders
public void onResponseHeaders(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpHeaders headers, java.lang.String status)Triggers LogElements for the ON_RESPONSE_HEADERS event.- Parameters:
ctx- The ChannelHandlerContext.headers- The response headers.status- The response status.
-
onResponseWrite
public void onResponseWrite(int bytesSent)
Triggers LogElements for the ON_RESPONSE_WRITE event.- Parameters:
bytesSent- The number of bytes sent.
-
onLastResponseWrite
public void onLastResponseWrite(int bytesSent)
Triggers LogElements for the ON_LAST_RESPONSE_WRITE event.- Parameters:
bytesSent- The number of bytes sent.
-
log
public void log(org.slf4j.Logger accessLogger)
Logs at info level the accumulated values.- Parameters:
accessLogger- A logger.
-
-