Class AccessLog

  • All Implemented Interfaces:

    
    public final class AccessLog
    extends AccessLog
                        

    Represents a logger for Logback Access IAccessEvent events within a given AccessContext and AccessLogArgProvider.

    This class is a bridge between the Reactor Netty HTTP logging mechanism and the Logback Access library. It is responsible for handling and logging access events based on the configured access context and argument provider. It extends Reactor Netty AccessLog, providing an implementation of the log method to capture and process access-related information.

    Author:

    Dmitry Sulman

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      AccessLog(AccessContext accessContext, AccessLogArgProvider argProvider) Initializes an AccessLog instance with the given AccessContext and AccessLogArgProvider.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit log() Logs an access event by creating an instance of AccessEvent and processing it through the AccessContext.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AccessLog

        AccessLog(AccessContext accessContext, AccessLogArgProvider argProvider)
        Initializes an AccessLog instance with the given AccessContext and AccessLogArgProvider.
    • Method Detail

      • log

         Unit log()

        Logs an access event by creating an instance of AccessEvent and processing it through the AccessContext.

        If the access event passes the filter chain decision (not returning FilterReply.DENY), it is passed to the access context's appenders for further processing. Otherwise, the event is discarded.

        If an error occurs during the logging process, it is recorded in the status manager of the AccessContext and logged using the internal logger.