public final class TextAuditLogPublisher extends AccessLogPublisher<T> implements ConfigurationChangeListener<FileBasedAuditLogPublisherCfg>
Modifier and Type | Field and Description |
---|---|
protected static LocalizedLogger |
logger |
Constructor and Description |
---|
TextAuditLogPublisher() |
Modifier and Type | Method and Description |
---|---|
ConfigChangeResult |
applyConfigurationChange(FileBasedAuditLogPublisherCfg config)
Applies the configuration changes to this change listener.
|
protected void |
buildFilters(boolean suppressInternal)
For startup access logger.
|
void |
close()
Close this publisher.
|
protected void |
close0()
Release any resources owned by the sub-implementation.
|
Dn |
getDN()
Gets the DN of the configuration entry for this log publisher.
|
protected String |
getTransactionId(RequestContext context) |
protected void |
initializeFilters(T config)
Initializes the filter configuration.
|
void |
initializeLogPublisher(FileBasedAuditLogPublisherCfg cfg,
ServerContext serverContext)
Initializes this publisher provider based on the information in the provided debug publisher configuration.
|
boolean |
isConfigurationAcceptable(FileBasedAuditLogPublisherCfg configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this log publisher.
|
boolean |
isConfigurationChangeAcceptable(FileBasedAuditLogPublisherCfg config,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable
to this change listener.
|
protected boolean |
isConnectLoggable(ClientConnection c)
Returns
true if the provided client connect should be logged. |
protected boolean |
isDisconnectLoggable(ClientConnection c)
Returns
true if the provided client disconnect should be logged. |
protected boolean |
isFilterConfigurationAcceptable(T config,
List<LocalizableMessage> unacceptableReasons)
Perform any initialization required by the sub-implementation.
|
protected boolean |
isRequestLoggable(RequestContext context,
Request request)
Returns
true if the provided request should be logged. |
protected boolean |
isResponseLoggable(RequestContext context,
Request request,
Response response)
Returns
true if the provided response should be logged. |
void |
logAddResult(RequestContext context,
AddRequest request,
Result result)
Writes a message to the access logger with information about the add result.
|
void |
logDeleteResult(RequestContext context,
DeleteRequest request,
Result result)
Writes a message to the access logger with information about the delete result.
|
void |
logModifyDnResult(RequestContext context,
ModifyDnRequest request,
Result result)
Writes a message to the access logger with information about the modifyDN result.
|
void |
logModifyResult(RequestContext context,
ModifyRequest request,
Result result)
Writes a message to the access logger with information about the modify result.
|
logAbandonRequest, logAbandonResult, logAddRequest, logBindRequest, logBindResult, logCompareRequest, logCompareResult, logConnect, logDeleteRequest, logDisconnect, logExtendedRequest, logExtendedResult, logInvalidRequest, logInvalidResult, logModifyDnRequest, logModifyRequest, logSearchRequest, logSearchResult, logUnbind
protected static final LocalizedLogger logger
public ConfigChangeResult applyConfigurationChange(FileBasedAuditLogPublisherCfg config)
ConfigurationChangeListener
applyConfigurationChange
in interface ConfigurationChangeListener<FileBasedAuditLogPublisherCfg>
config
- The new configuration containing the changes.protected void close0()
public void initializeLogPublisher(FileBasedAuditLogPublisherCfg cfg, ServerContext serverContext) throws ConfigException, InitializationException
LogPublisher
initializeLogPublisher
in interface LogPublisher<FileBasedAuditLogPublisherCfg>
cfg
- The publisher configuration that contains the information to use to initialize this publisher.serverContext
- The server context.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.public boolean isConfigurationAcceptable(FileBasedAuditLogPublisherCfg configuration, List<LocalizableMessage> unacceptableReasons)
LogPublisher
isConfigurationAcceptable
in interface LogPublisher<FileBasedAuditLogPublisherCfg>
isConfigurationAcceptable
in class AccessLogPublisher<FileBasedAuditLogPublisherCfg>
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.true
if the provided configuration is acceptable for this log publisher, or false
if not.public boolean isConfigurationChangeAcceptable(FileBasedAuditLogPublisherCfg config, List<LocalizableMessage> unacceptableReasons)
ConfigurationChangeListener
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<FileBasedAuditLogPublisherCfg>
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.true
if the proposed change is acceptable,
or false
if it is not.public void logAddResult(RequestContext context, AddRequest request, Result result)
AccessLogPublisher
The default implementation is to not log anything.
logAddResult
in class AccessLogPublisher<FileBasedAuditLogPublisherCfg>
context
- the logging context for the requestrequest
- the original add requestresult
- the result to logpublic void logDeleteResult(RequestContext context, DeleteRequest request, Result result)
AccessLogPublisher
The default implementation is to not log anything.
logDeleteResult
in class AccessLogPublisher<FileBasedAuditLogPublisherCfg>
context
- the logging context for the requestrequest
- the original delete requestresult
- the result to logpublic void logModifyResult(RequestContext context, ModifyRequest request, Result result)
AccessLogPublisher
The default implementation is to not log anything.
logModifyResult
in class AccessLogPublisher<FileBasedAuditLogPublisherCfg>
context
- the logging context for the requestrequest
- the original modify requestresult
- the result to logpublic void logModifyDnResult(RequestContext context, ModifyDnRequest request, Result result)
AccessLogPublisher
The default implementation is to not log anything.
logModifyDnResult
in class AccessLogPublisher<FileBasedAuditLogPublisherCfg>
context
- the logging context for the requestrequest
- the original modifyDN requestresult
- the result to logprotected String getTransactionId(RequestContext context)
public final void close()
LogPublisher
public final Dn getDN()
LogPublisher
protected void buildFilters(boolean suppressInternal)
suppressInternal
- true
if internal operations should be suppressed.protected final void initializeFilters(T config) throws ConfigException
config
- The access publisher configuration that contains the information to use to initialize this access
publisher.ConfigException
- If an unrecoverable problem arises in the process of performing the initialization as a result of the
server configuration.protected final boolean isConnectLoggable(ClientConnection c)
true
if the provided client connect should be logged.c
- The client connection.true
if the provided client connect should be logged.protected final boolean isDisconnectLoggable(ClientConnection c)
true
if the provided client disconnect should be logged.c
- The client connection.true
if the provided client disconnect should be logged.protected final boolean isFilterConfigurationAcceptable(T config, List<LocalizableMessage> unacceptableReasons)
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.true
if the provided configuration is acceptable for this access log publisher, or false
if not.protected final boolean isRequestLoggable(RequestContext context, Request request)
true
if the provided request should be logged.context
- the log contextrequest
- the request to logtrue
if the provided request should be logged.protected final boolean isResponseLoggable(RequestContext context, Request request, Response response)
true
if the provided response should be logged.context
- the log contextrequest
- the request to which the response correspondsresponse
- the response to logtrue
if the provided response should be logged.Copyright 2010-2022 ForgeRock AS.