Class AccessLog


  • public class AccessLog
    extends java.lang.Object
    An Access log instance.
    Since:
    2.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void log​(org.slf4j.Logger accessLogger)
      Logs at info level the accumulated values.
      void onLastResponseWrite​(int bytesSent)
      Triggers LogElements for the ON_LAST_RESPONSE_WRITE event.
      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.
      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.
      void onResponseWrite​(int bytesSent)
      Triggers LogElements for the ON_RESPONSE_WRITE event.
      void reset()
      Resets the current values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.