Class TextAuditLogPublisher

    • Field Detail

      • logger

        protected static final org.forgerock.i18n.slf4j.LocalizedLogger logger
        The tracer object for the debug logger.
    • Constructor Detail

      • TextAuditLogPublisher

        public TextAuditLogPublisher()
    • Method Detail

      • close0

        protected void close0()
        Release any resources owned by the sub-implementation.
      • isConfigurationAcceptable

        public boolean isConfigurationAcceptable​(FileBasedAuditLogPublisherCfg configuration,
                                                 List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
        Description copied from interface: LogPublisher
        Indicates whether the provided configuration is acceptable for this log publisher. It should be possible to call this method on an uninitialized log publisher instance in order to determine whether the log publisher would be able to use the provided configuration.

        Note that implementations which use a subclass of the provided configuration class will likely need to cast the configuration to the appropriate subclass type.
        Specified by:
        isConfigurationAcceptable in interface LogPublisher<FileBasedAuditLogPublisherCfg>
        Overrides:
        isConfigurationAcceptable in class AccessLogPublisher<FileBasedAuditLogPublisherCfg>
        Parameters:
        configuration - The log publisher configuration for which to make the determination.
        unacceptableReasons - A list that may be used to hold the reasons that the provided configuration is not acceptable.
        Returns:
        true if the provided configuration is acceptable for this log publisher, or false if not.
      • isConfigurationChangeAcceptable

        public boolean isConfigurationChangeAcceptable​(FileBasedAuditLogPublisherCfg config,
                                                       List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
        Description copied from interface: ConfigurationChangeListener
        Indicates whether the proposed change to the configuration is acceptable to this change listener.
        Specified by:
        isConfigurationChangeAcceptable in interface ConfigurationChangeListener<FileBasedAuditLogPublisherCfg>
        Parameters:
        config - The new configuration containing the changes.
        unacceptableReasons - A list that can be used to hold messages about why the provided configuration is not acceptable.
        Returns:
        Returns true if the proposed change is acceptable, or false if it is not.
      • logAddResponse

        public void logAddResponse​(AddOperation addOperation)
        Description copied from class: AccessLogPublisher
        Writes a message to the access logger with information about the add response associated with the provided add operation.

        The default implementation is to not log anything.

        Overrides:
        logAddResponse in class AccessLogPublisher<FileBasedAuditLogPublisherCfg>
        Parameters:
        addOperation - The add operation containing the information to use to log the add response.
      • logDeleteResponse

        public void logDeleteResponse​(DeleteOperation deleteOperation)
        Description copied from class: AccessLogPublisher
        Writes a message to the access logger with information about the delete response associated with the provided delete operation.

        The default implementation is to not log anything.

        Overrides:
        logDeleteResponse in class AccessLogPublisher<FileBasedAuditLogPublisherCfg>
        Parameters:
        deleteOperation - The delete operation containing the information to use to log the delete response.
      • logModifyDNResponse

        public void logModifyDNResponse​(ModifyDNOperation modifyDNOperation)
        Description copied from class: AccessLogPublisher
        Writes a message to the access logger with information about the modify DN response associated with the provided modify DN operation.

        The default implementation is to not log anything.

        Overrides:
        logModifyDNResponse in class AccessLogPublisher<FileBasedAuditLogPublisherCfg>
        Parameters:
        modifyDNOperation - The modify DN operation containing the information to use to log the modify DN response.
      • logModifyResponse

        public void logModifyResponse​(ModifyOperation modifyOperation)
        Description copied from class: AccessLogPublisher
        Writes a message to the access logger with information about the modify response associated with the provided modify operation.

        The default implementation is to not log anything.

        Overrides:
        logModifyResponse in class AccessLogPublisher<FileBasedAuditLogPublisherCfg>
        Parameters:
        modifyOperation - The modify operation containing the information to use to log the modify response.
      • close

        public final void close()
        Description copied from interface: LogPublisher
        Close this publisher.
      • getDN

        public final DN getDN()
        Description copied from interface: LogPublisher
        Gets the DN of the configuration entry for this log publisher.
        Returns:
        The configuration entry DN.
      • buildFilters

        protected void buildFilters​(boolean suppressInternal)
        For startup access logger.
        Parameters:
        suppressInternal - true if internal operations should be suppressed.
      • initializeFilters

        protected final void initializeFilters​(T config)
                                        throws ConfigException,
                                               InitializationException
        Initializes the filter configuration. This method must be called by sub-classes during initialization.
        Parameters:
        config - The access publisher configuration that contains the information to use to initialize this access publisher.
        Throws:
        ConfigException - If an unrecoverable problem arises in the process of performing the initialization as a result of the server configuration.
        InitializationException - If a problem occurs during initialization that is not related to the server configuration.
      • isConnectLoggable

        protected final boolean isConnectLoggable​(ClientConnection c)
        Returns true if the provided client connect should be logged.
        Parameters:
        c - The client connection.
        Returns:
        true if the provided client connect should be logged.
      • isDisconnectLoggable

        protected final boolean isDisconnectLoggable​(ClientConnection c)
        Returns true if the provided client disconnect should be logged.
        Parameters:
        c - The client connection.
        Returns:
        true if the provided client disconnect should be logged.
      • isFilterConfigurationAcceptable

        protected final boolean isFilterConfigurationAcceptable​(T config,
                                                                List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
        Perform any initialization required by the sub-implementation.
        Parameters:
        config - The access publisher configuration that contains the information to use to initialize this access publisher.
        unacceptableReasons - A list that may be used to hold the reasons that the provided configuration is not acceptable.
        Returns:
        true if the provided configuration is acceptable for this access log publisher, or false if not.
      • isRequestLoggable

        protected final boolean isRequestLoggable​(Operation o)
        Returns true if the provided request should be logged.
        Parameters:
        o - The request.
        Returns:
        true if the provided request should be logged.
      • isResponseLoggable

        protected final boolean isResponseLoggable​(Operation o)
        Returns true if the provided response should be logged.
        Parameters:
        o - The response.
        Returns:
        true if the provided response should be logged.