Package org.opends.server.loggers
Class AccessLogger
- java.lang.Object
-
- org.opends.server.loggers.AbstractLogger<AccessLogPublisher<AccessLogPublisherCfg>,AccessLogPublisherCfg>
-
- org.opends.server.loggers.AccessLogger
-
- All Implemented Interfaces:
ConfigurationAddListener<AccessLogPublisherCfg>
,ConfigurationChangeListener<AccessLogPublisherCfg>
,ConfigurationDeleteListener<AccessLogPublisherCfg>
public final class AccessLogger extends AbstractLogger<AccessLogPublisher<AccessLogPublisherCfg>,AccessLogPublisherCfg>
This class defines the wrapper that will invoke all registered access loggers for each type of request received or response sent.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLogPublisher(AccessLogPublisher<AccessLogPublisherCfg> publisher)
Add a log publisher to the logger.static AccessLogger
getInstance()
Retrieve the singleton instance of this class.protected ClassPropertyDefinition
getJavaClassPropertyDefinition()
Returns the javaClassPropertyDefinition
for the current logger.protected Collection<AccessLogPublisher<AccessLogPublisherCfg>>
getLogPublishers()
Returns the log publishers.static void
logAbandonRequest(RequestContext context, AbandonRequest request)
Writes a message to the access logger with information about the provided abandon request.static void
logAbandonResult(RequestContext context, AbandonRequest request, Result result)
Writes a message to the access logger with information about the provided result.static void
logAddRequest(RequestContext context, AddRequest request)
Writes a message to the access logger with information about the provided add request.static void
logAddResult(RequestContext context, AddRequest request, Result result)
Writes a message to the access logger with information about the provided result.static void
logBindRequest(RequestContext context, BindRequest request)
Writes a message to the access logger with information about the provided bind request.static void
logBindResult(RequestContext context, BindRequest request, Result result)
Writes a message to the access logger with information about the provided bind result.static void
logCompareRequest(RequestContext context, CompareRequest request)
Writes a message to the access logger with information about the provided compare request.static void
logCompareResult(RequestContext context, CompareRequest request, Result result)
Writes a message to the access logger with information about the provided compare result.static void
logConnect(ConnectionContext connectionContext)
Writes a message to the access logger with information about a new client connection that has been established, regardless of whether it will be immediately terminated.static void
logDeleteRequest(RequestContext context, DeleteRequest request)
Writes a message to the access logger with information about the provided delete request.static void
logDeleteResult(RequestContext context, DeleteRequest request, Result result)
Writes a message to the access logger with information about the provided delete result.static void
logDisconnect(ConnectionContext connectionContext, DisconnectReason disconnectReason, LocalizableMessage message)
Writes a message to the access logger with information about the termination of an existing client connection.static void
logExtendedRequest(RequestContext context, ExtendedRequest<?> request)
Writes a message to the access logger with information about the provided extended request.static void
logExtendedResult(RequestContext context, ExtendedRequest<?> request, Result result)
Writes a message to the access logger with information about the provided extended result.static void
logInvalidRequest(RequestContext context, InvalidRequest request)
Writes a message to the access logger with information about an invalid request.static void
logInvalidResult(RequestContext context, InvalidRequest request, Result result)
Writes a message to the access logger with information about the provided result.static void
logModifyDnRequest(RequestContext context, ModifyDnRequest request)
Writes a message to the access logger with information about the provided modifyDN request.static void
logModifyDnResult(RequestContext context, ModifyDnRequest request, Result result)
Writes a message to the access logger with information about the provided modifyDN result.static void
logModifyRequest(RequestContext context, ModifyRequest request)
Writes a message to the access logger with information about the provided modify request.static void
logModifyResult(RequestContext context, ModifyRequest request, Result result)
Writes a message to the access logger with information about the provided modify result.static void
logSearchRequest(RequestContext context, SearchRequest request)
Writes a message to the access logger with information about the provided search request.static void
logSearchResult(RequestContext context, SearchRequest request, Result result)
Writes a message to the access logger with information about the provided search result.static void
logUnbind(RequestContext context, UnbindRequest request)
Writes a message to the access logger with information about the provided unbind request.void
removeAllLogPublishers()
Removes all existing log publishers from the logger.void
removeLogPublisher(AccessLogPublisher<AccessLogPublisherCfg> publisher)
Remove a log publisher from the logger.-
Methods inherited from class org.opends.server.loggers.AbstractLogger
applyConfigurationAdd, applyConfigurationChange, applyConfigurationDelete, initializeLogger, isConfigurationAddAcceptable, isConfigurationChangeAcceptable, isConfigurationDeleteAcceptable, modifyLogPublisher
-
-
-
-
Method Detail
-
getJavaClassPropertyDefinition
protected ClassPropertyDefinition getJavaClassPropertyDefinition()
Description copied from class:AbstractLogger
Returns the javaClassPropertyDefinition
for the current logger.- Specified by:
getJavaClassPropertyDefinition
in classAbstractLogger<AccessLogPublisher<AccessLogPublisherCfg>,AccessLogPublisherCfg>
- Returns:
- the java
ClassPropertyDefinition
for the current logger.
-
getLogPublishers
protected Collection<AccessLogPublisher<AccessLogPublisherCfg>> getLogPublishers()
Description copied from class:AbstractLogger
Returns the log publishers.- Specified by:
getLogPublishers
in classAbstractLogger<AccessLogPublisher<AccessLogPublisherCfg>,AccessLogPublisherCfg>
- Returns:
- the collection of
LogPublisher
s
-
getInstance
public static AccessLogger getInstance()
Retrieve the singleton instance of this class.- Returns:
- The singleton instance of this logger.
-
logConnect
public static void logConnect(ConnectionContext connectionContext)
Writes a message to the access logger with information about a new client connection that has been established, regardless of whether it will be immediately terminated.- Parameters:
connectionContext
- The client connection that has been established.
-
logDisconnect
public static void logDisconnect(ConnectionContext connectionContext, DisconnectReason disconnectReason, LocalizableMessage message)
Writes a message to the access logger with information about the termination of an existing client connection.- Parameters:
connectionContext
- The client connection that has been terminated.disconnectReason
- A generic disconnect reason for the connection termination.message
- A human-readable message that can provide additional information about the disconnect.
-
addLogPublisher
public void addLogPublisher(AccessLogPublisher<AccessLogPublisherCfg> publisher)
Description copied from class:AbstractLogger
Add a log publisher to the logger.- Specified by:
addLogPublisher
in classAbstractLogger<AccessLogPublisher<AccessLogPublisherCfg>,AccessLogPublisherCfg>
- Parameters:
publisher
- The log publisher to add.
-
removeLogPublisher
public void removeLogPublisher(AccessLogPublisher<AccessLogPublisherCfg> publisher)
Description copied from class:AbstractLogger
Remove a log publisher from the logger.- Specified by:
removeLogPublisher
in classAbstractLogger<AccessLogPublisher<AccessLogPublisherCfg>,AccessLogPublisherCfg>
- Parameters:
publisher
- The log publisher to remove.
-
removeAllLogPublishers
public void removeAllLogPublishers()
Description copied from class:AbstractLogger
Removes all existing log publishers from the logger.- Specified by:
removeAllLogPublishers
in classAbstractLogger<AccessLogPublisher<AccessLogPublisherCfg>,AccessLogPublisherCfg>
-
logAbandonRequest
public static void logAbandonRequest(RequestContext context, AbandonRequest request)
Writes a message to the access logger with information about the provided abandon request.- Parameters:
context
- the context for this requestrequest
- the request to log
-
logAbandonResult
public static void logAbandonResult(RequestContext context, AbandonRequest request, Result result)
Writes a message to the access logger with information about the provided result. Note there is no LDAP result sent back to client, it is for logging purposes only.- Parameters:
context
- the context for the requestrequest
- the original abandon requestresult
- theResult
to the abandon request
-
logAddRequest
public static void logAddRequest(RequestContext context, AddRequest request)
Writes a message to the access logger with information about the provided add request.- Parameters:
context
- the context for this requestrequest
- the request to log
-
logAddResult
public static void logAddResult(RequestContext context, AddRequest request, Result result)
Writes a message to the access logger with information about the provided result.- Parameters:
context
- the context for the requestrequest
- the original add requestresult
- theResult
to the add request
-
logBindRequest
public static void logBindRequest(RequestContext context, BindRequest request)
Writes a message to the access logger with information about the provided bind request.- Parameters:
context
- the context for this requestrequest
- the request to log
-
logBindResult
public static void logBindResult(RequestContext context, BindRequest request, Result result)
Writes a message to the access logger with information about the provided bind result.- Parameters:
context
- the context for the requestrequest
- the original bind requestresult
- theResult
to the bind request
-
logCompareRequest
public static void logCompareRequest(RequestContext context, CompareRequest request)
Writes a message to the access logger with information about the provided compare request.- Parameters:
context
- the context for this requestrequest
- the request to log
-
logCompareResult
public static void logCompareResult(RequestContext context, CompareRequest request, Result result)
Writes a message to the access logger with information about the provided compare result.- Parameters:
context
- the context for the requestrequest
- the original compare requestresult
- theCompareResult
to the compare request
-
logDeleteRequest
public static void logDeleteRequest(RequestContext context, DeleteRequest request)
Writes a message to the access logger with information about the provided delete request.- Parameters:
context
- the context for this requestrequest
- the request to log
-
logDeleteResult
public static void logDeleteResult(RequestContext context, DeleteRequest request, Result result)
Writes a message to the access logger with information about the provided delete result.- Parameters:
context
- the context for the requestrequest
- the original delete requestresult
- theResult
to the delete request
-
logExtendedRequest
public static void logExtendedRequest(RequestContext context, ExtendedRequest<?> request)
Writes a message to the access logger with information about the provided extended request.- Parameters:
context
- the context for this requestrequest
- the request to log
-
logExtendedResult
public static void logExtendedResult(RequestContext context, ExtendedRequest<?> request, Result result)
Writes a message to the access logger with information about the provided extended result.- Parameters:
context
- the context for the requestrequest
- the original extended requestresult
- theResult
to the extended request
-
logInvalidRequest
public static void logInvalidRequest(RequestContext context, InvalidRequest request)
Writes a message to the access logger with information about an invalid request.- Parameters:
context
- the context for this requestrequest
- the description of the invalid request to log
-
logInvalidResult
public static void logInvalidResult(RequestContext context, InvalidRequest request, Result result)
Writes a message to the access logger with information about the provided result.- Parameters:
context
- the context for the requestrequest
- the original description of the invalid requestresult
- theResult
to the request
-
logModifyRequest
public static void logModifyRequest(RequestContext context, ModifyRequest request)
Writes a message to the access logger with information about the provided modify request.- Parameters:
context
- the context for this requestrequest
- the request to log
-
logModifyResult
public static void logModifyResult(RequestContext context, ModifyRequest request, Result result)
Writes a message to the access logger with information about the provided modify result.- Parameters:
context
- the context for the requestrequest
- the original modify requestresult
- theResult
to the modify request
-
logModifyDnRequest
public static void logModifyDnRequest(RequestContext context, ModifyDnRequest request)
Writes a message to the access logger with information about the provided modifyDN request.- Parameters:
context
- the context for this requestrequest
- the request to log
-
logModifyDnResult
public static void logModifyDnResult(RequestContext context, ModifyDnRequest request, Result result)
Writes a message to the access logger with information about the provided modifyDN result.- Parameters:
context
- the context for the requestrequest
- the original modifyDN requestresult
- theResult
to the modifyDN request
-
logSearchRequest
public static void logSearchRequest(RequestContext context, SearchRequest request)
Writes a message to the access logger with information about the provided search request.- Parameters:
context
- the context for this requestrequest
- the request to log
-
logSearchResult
public static void logSearchResult(RequestContext context, SearchRequest request, Result result)
Writes a message to the access logger with information about the provided search result. Only SearchResultDone will be logged, not result entries nor result references.- Parameters:
context
- the context for the requestrequest
- the original search requestresult
- theResult
to the search request
-
logUnbind
public static void logUnbind(RequestContext context, UnbindRequest request)
Writes a message to the access logger with information about the provided unbind request.- Parameters:
context
- the context for the requestrequest
- the request to log
-
-