Package com.unboundid.ldap.sdk
Class JSONLDAPConnectionLoggerProperties
java.lang.Object
com.unboundid.ldap.sdk.JSONLDAPConnectionLoggerProperties
- All Implemented Interfaces:
Serializable
@Mutable
@ThreadSafety(level=NOT_THREADSAFE)
public final class JSONLDAPConnectionLoggerProperties
extends Object
implements Serializable
This class provides a data structure that can be used to define the
properties to use when creating a
JSONLDAPConnectionLogger.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new set of JSON LDAP connection logger properties with the default settings.Creates a new set of JSON LDAP connection logger properties using the configuration for the provided logger.Creates a new set of JSON LDAP connection logger properties that is a clone of the provided set of properties. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether the log handler should be flushed after logging each successful or failed connection attempt.booleanIndicates whether the log handler should be flushed after logging each disconnect.booleanIndicates whether the log handler should be flushed after logging the final result for each operation.booleanIndicates whether the log handler should be flushed after logging each non-final result (including search result entries, search result references, and intermediate response messages).booleanIndicates whether the log handler should be flushed after logging each request.Retrieves a set containing the names or OIDs of the attributes whose values should be redacted from log messages.Retrieves the set of operation types for which to log requests and results.Retrieves the schema that will be used to identify alternate names and OIDs for attributes whose values should be redacted.booleanIndicates whether log messages about add requests should include the names of the attributes provided in the request.booleanIndicates whether log messages about add requests should include the values of the attributes provided in the request.booleanIndicates whether request and result log messages should include the OIDs of any controls included in that request or result.booleanIndicates whether log messages about modify requests should include the names of the attributes modified in the request.booleanIndicates whether log messages about modify requests should include the values of the attributes modified in the request.booleanIndicates whether log messages about search result entries should include the names of the attributes in the returned entry.booleanIndicates whether log messages about search result entries should include the values of the attributes in the returned entry.booleanIndicates whether to log successful and failed connection attempts.booleanIndicates whether to log disconnects.booleanIndicates whether to log messages about the final results for operations included in the set of operation types returned by thegetOperationTypes()method.booleanIndicates whether to log messages about each intermediate response returned in the course of processing an operation.booleanIndicates whether to log messages about requests for operations included in the set of operation types returned by thegetOperationTypes()method.booleanIndicates whether to log messages about each search result entry returned for search operations.booleanIndicates whether to log messages about each search result reference returned for search operations.voidsetAttributesToRedact(String... attributesToRedact) Specifies the names or OIDs of the attributes whose values should be redacted from log messages.voidsetAttributesToRedact(Collection<String> attributesToRedact) Specifies the names or OIDs of the attributes whose values should be redacted from log messages.voidsetFlushAfterConnectMessages(boolean flushAfterConnectMessages) Specifies whether the log handler should be flushed after logging each successful or failed connection attempt.voidsetFlushAfterDisconnectMessages(boolean flushAfterDisconnectMessages) Specifies whether the log handler should be flushed after logging each disconnect.voidsetFlushAfterFinalResultMessages(boolean flushAfterFinalResultMessages) Specifies whether the log handler should be flushed after logging the final result for each operation.voidsetFlushAfterNonFinalResultMessages(boolean flushAfterNonFinalResultMessages) Specifies whether the log handler should be flushed after logging each non-final result (including search result entries, search result references, and intermediate result messages).voidsetFlushAfterRequestMessages(boolean flushAfterRequestMessages) Specifies whether the log handler should be flushed after logging each request.voidsetIncludeAddAttributeNames(boolean includeAddAttributeNames) Specifies whether log messages about add requests should include the names of the attributes provided in the request.voidsetIncludeAddAttributeValues(boolean includeAddAttributeValues) Specifies whether log messages about add requests should include the values of the attributes provided in the request.voidsetIncludeControlOIDs(boolean includeControlOIDs) Specifies whether request and result log messages should include the OIDs of any controls included in that request or result.voidsetIncludeModifyAttributeNames(boolean includeModifyAttributeNames) Specifies whether log messages about modify requests should include the names of the attributes modified in the request.voidsetIncludeModifyAttributeValues(boolean includeModifyAttributeValues) Specifies whether log messages about modify requests should include the values of the attributes modified in the request.voidsetIncludeSearchEntryAttributeNames(boolean includeSearchEntryAttributeNames) Specifies whether log messages about search result entries should include the names of the attributes in the returned entry.voidsetIncludeSearchEntryAttributeValues(boolean includeSearchEntryAttributeValues) Specifies whether log messages about search result entries should include the values of the attributes in the returned entry.voidsetLogConnects(boolean logConnects) Specifies whether to log successful and failed connection attempts.voidsetLogDisconnects(boolean logDisconnects) Specifies whether to log disconnects.voidsetLogFinalResults(boolean logFinalResults) Specifies whether to log messages about the final results for operations included in the set of operation types returned by thegetOperationTypes()method.voidsetLogIntermediateResponses(boolean logIntermediateResponses) Specifies whether to log messages about each intermediate response returned in the course of processing an operation.voidsetLogRequests(boolean logRequests) Specifies whether to log messages about requests for operations included in the set of operation types returned by thegetOperationTypes()method.voidsetLogSearchEntries(boolean logSearchEntries) Specifies whether to log messages about each search result entry returned for search operations.voidsetLogSearchReferences(boolean logSearchReferences) Specifies whether to log messages about each search result reference returned for search operations.voidsetOperationTypes(OperationType... operationTypes) Specifies the set of operation types for which to log requests and results.voidsetOperationTypes(Collection<OperationType> operationTypes) Specifies the set of operation types for which to log requests and results.voidSpecifies the schema that will be used to identify alternate names and OIDs for attributes whose values should be redacted.toString()Retrieves a string representation of thisJSONLDAPConnectionLoggerPropertiesobject.voidtoString(StringBuilder buffer) Appends a string representation of thisJSONLDAPConnectionLoggerPropertiesobject to the provided buffer.
-
Constructor Details
-
JSONLDAPConnectionLoggerProperties
public JSONLDAPConnectionLoggerProperties()Creates a new set of JSON LDAP connection logger properties with the default settings. -
JSONLDAPConnectionLoggerProperties
Creates a new set of JSON LDAP connection logger properties that is a clone of the provided set of properties.- Parameters:
properties- The set of properties to copy. It must not benull.
-
JSONLDAPConnectionLoggerProperties
Creates a new set of JSON LDAP connection logger properties using the configuration for the provided logger.- Parameters:
logger- The JSON LDAP connection logger whose configuration should be used to create the set of properties.
-
-
Method Details
-
logConnects
Indicates whether to log successful and failed connection attempts. Connection attempts will be logged by default.- Returns:
trueif connection attempts should be logged, orfalseif not.
-
setLogConnects
Specifies whether to log successful and failed connection attempts.- Parameters:
logConnects- Indicates whether to log successful and failed connection attempts.
-
logDisconnects
Indicates whether to log disconnects. Disconnects will be logged by default.- Returns:
trueif disconnects should be logged, orfalseif not.
-
setLogDisconnects
Specifies whether to log disconnects. Disconnects will be logged by default.- Parameters:
logDisconnects- Indicates whether to log disconnects.
-
logRequests
Indicates whether to log messages about requests for operations included in the set of operation types returned by thegetOperationTypes()method. Operation requests will be logged by default.- Returns:
trueif operation requests should be logged for appropriate operation types, orfalseif not.
-
setLogRequests
Specifies whether to log messages about requests for operations included in the set of operation types returned by thegetOperationTypes()method.- Parameters:
logRequests- Indicates whether to log messages about operation requests.
-
logFinalResults
Indicates whether to log messages about the final results for operations included in the set of operation types returned by thegetOperationTypes()method. Final operation results will be logged by default.- Returns:
trueif operation requests should be logged for appropriate operation types, orfalseif not.
-
setLogFinalResults
Specifies whether to log messages about the final results for operations included in the set of operation types returned by thegetOperationTypes()method.- Parameters:
logFinalResults- Indicates whether to log messages about final operation results.
-
logSearchEntries
Indicates whether to log messages about each search result entry returned for search operations. This property will only be used if the set returned by thegetOperationTypes()method includesOperationType.SEARCH. Search result entries will not be logged by default.- Returns:
trueif search result entries should be logged, orfalseif not.
-
setLogSearchEntries
Specifies whether to log messages about each search result entry returned for search operations. This property will only be used if the set returned by thegetOperationTypes()method includesOperationType.SEARCH.- Parameters:
logSearchEntries- Indicates whether to log search result entry messages.
-
logSearchReferences
Indicates whether to log messages about each search result reference returned for search operations. This property will only be used if the set returned by thegetOperationTypes()method includesOperationType.SEARCH. Search result references will not be logged by default.- Returns:
trueif search result references should be logged, orfalseif not.
-
setLogSearchReferences
Specifies whether to log messages about each search result reference returned for search operations. This property will only be used if the set returned by thegetOperationTypes()method includesOperationType.SEARCH.- Parameters:
logSearchReferences- Indicates whether to log search result reference messages.
-
logIntermediateResponses
Indicates whether to log messages about each intermediate response returned in the course of processing an operation. Intermediate response messages will be logged by default.- Returns:
trueif intermediate response messages should be logged, orfalseif not.
-
setLogIntermediateResponses
Specifies whether to log messages about each intermediate response returned in the course of processing an operation.- Parameters:
logIntermediateResponses- Indicates whether to log intermediate response messages.
-
getOperationTypes
Retrieves the set of operation types for which to log requests and results. All operation types will be logged by default.- Returns:
- The set of operation types for which to log requests and results.
-
setOperationTypes
Specifies the set of operation types for which to log requests and results.- Parameters:
operationTypes- The set of operation types for which to log requests and results. It may benullor empty if no operation types should be logged.
-
setOperationTypes
Specifies the set of operation types for which to log requests and results.- Parameters:
operationTypes- The set of operation types for which to log requests and results. It may benullor empty if no operation types should be logged.
-
includeAddAttributeNames
Indicates whether log messages about add requests should include the names of the attributes provided in the request. Add attribute names (but not values) will be logged by default.- Returns:
trueif add attribute names should be logged, orfalseif not.
-
setIncludeAddAttributeNames
Specifies whether log messages about add requests should include the names of the attributes provided in the request.- Parameters:
includeAddAttributeNames- Indicates whether to include attribute names in add request log messages.
-
includeAddAttributeValues
Indicates whether log messages about add requests should include the values of the attributes provided in the request. This property will only be used ifincludeAddAttributeNamesreturnstrue. Values for attributes named in the set returned by thegetAttributesToRedact()method will be replaced with a value of "[REDACTED]". Add attribute names (but not values) will be logged by default.- Returns:
trueif add attribute values should be logged, orfalseif not.
-
setIncludeAddAttributeValues
Specifies whether log messages about add requests should include the values of the attributes provided in the request. This property will only be used ifincludeAddAttributeNamesreturnstrue. Values for attributes named in the set returned by thegetAttributesToRedact()method will be replaced with a value of "[REDACTED]".- Parameters:
includeAddAttributeValues- Indicates whether to include attribute values in add request log messages.
-
includeModifyAttributeNames
Indicates whether log messages about modify requests should include the names of the attributes modified in the request. Modified attribute names (but not values) will be logged by default.- Returns:
trueif modify attribute names should be logged, orfalseif not.
-
setIncludeModifyAttributeNames
Specifies whether log messages about modify requests should include the names of the attributes modified in the request.- Parameters:
includeModifyAttributeNames- Indicates whether to include attribute names in modify request log messages.
-
includeModifyAttributeValues
Indicates whether log messages about modify requests should include the values of the attributes modified in the request. This property will only be used ifincludeModifyAttributeNamesreturnstrue. Values for attributes named in the set returned by thegetAttributesToRedact()method will be replaced with a value of "[REDACTED]". Modify attribute names (but not values) will be logged by default.- Returns:
trueif modify attribute values should be logged, orfalseif not.
-
setIncludeModifyAttributeValues
Specifies whether log messages about modify requests should include the values of the attributes modified in the request. This property will only be used ifincludeModifyAttributeNamesreturnstrue. Values for attributes named in the set returned by thegetAttributesToRedact()method will be replaced with a value of "[REDACTED]".- Parameters:
includeModifyAttributeValues- Indicates whether to include attribute values in modify request log messages.
-
includeSearchEntryAttributeNames
Indicates whether log messages about search result entries should include the names of the attributes in the returned entry. Entry attribute names (but not values) will be logged by default.- Returns:
trueif search result entry attribute names should be logged, orfalseif not.
-
setIncludeSearchEntryAttributeNames
Specifies whether log messages about search result entries should include the names of the attributes in the returned entry.- Parameters:
includeSearchEntryAttributeNames- Indicates whether to include attribute names in search result entry log messages.
-
includeSearchEntryAttributeValues
Indicates whether log messages about search result entries should include the values of the attributes in the returned entry. This property will only be used ifincludeSearchEntryAttributeNamesreturnstrue. Values for attributes named in the set returned by thegetAttributesToRedact()method will be replaced with a value of "[REDACTED]". Entry attribute names (but not values) will be logged by default.- Returns:
trueif search result entry attribute values should be logged, orfalseif not.
-
setIncludeSearchEntryAttributeValues
Specifies whether log messages about search result entries should include the values of the attributes in the returned entry. This property will only be used ifincludeSearchEntryAttributeNamesreturnstrue. Values for attributes named in the set returned by thegetAttributesToRedact()method will be replaced with a value of "[REDACTED]".- Parameters:
includeSearchEntryAttributeValues- Indicates whether to include attribute values in search result entry log messages.
-
getAttributesToRedact
Retrieves a set containing the names or OIDs of the attributes whose values should be redacted from log messages. Values of the userPassword, authPassword, and unicodePWD attributes will be redacted by default.- Returns:
- A set containing the names or OIDs of the attributes whose values should be redacted from log messages, or an empty set if no attribute values should be redacted.
-
setAttributesToRedact
Specifies the names or OIDs of the attributes whose values should be redacted from log messages.- Parameters:
attributesToRedact- The names or OIDs of the attributes whose values should be redacted. It may benullor empty if no attribute values should be redacted.
-
setAttributesToRedact
Specifies the names or OIDs of the attributes whose values should be redacted from log messages.- Parameters:
attributesToRedact- The names or OIDs of the attributes whose values should be redacted. It may benullor empty if no attribute values should be redacted.
-
includeControlOIDs
Indicates whether request and result log messages should include the OIDs of any controls included in that request or result. Control OIDs will be logged by default.- Returns:
trueif request control OIDs should be logged, orfalseif not.
-
setIncludeControlOIDs
Specifies whether request and result log messages should include the OIDs of any controls included in that request or result.- Parameters:
includeControlOIDs- Indicates whether to include control OIDs in request and result log messages.
-
flushAfterConnectMessages
Indicates whether the log handler should be flushed after logging each successful or failed connection attempt. By default, the handler will be flushed after logging each connection attempt.- Returns:
trueif the log handler should be flushed after logging each connection attempt, orfalseif not.
-
setFlushAfterConnectMessages
Specifies whether the log handler should be flushed after logging each successful or failed connection attempt.- Parameters:
flushAfterConnectMessages- Indicates whether the log handler should be flushed after logging each connection attempt.
-
flushAfterDisconnectMessages
Indicates whether the log handler should be flushed after logging each disconnect. By default, the handler will be flushed after logging each disconnect.- Returns:
trueif the log handler should be flushed after logging each disconnect, orfalseif not.
-
setFlushAfterDisconnectMessages
Specifies whether the log handler should be flushed after logging each disconnect.- Parameters:
flushAfterDisconnectMessages- Indicates whether the log handler should be flushed after logging each disconnect.
-
flushAfterRequestMessages
Indicates whether the log handler should be flushed after logging each request. By default, the handler will be flushed after logging each final result, but not after logging requests or non-final results.- Returns:
trueif the log handler should be flushed after logging each request, orfalseif not.
-
setFlushAfterRequestMessages
Specifies whether the log handler should be flushed after logging each request.- Parameters:
flushAfterRequestMessages- Indicates whether the log handler should be flushed after logging each request.
-
flushAfterNonFinalResultMessages
Indicates whether the log handler should be flushed after logging each non-final result (including search result entries, search result references, and intermediate response messages). By default, the handler will be flushed after logging each final result, but not after logging requests or non-final results.- Returns:
trueif the log handler should be flushed after logging each non-final result, orfalseif not.
-
setFlushAfterNonFinalResultMessages
Specifies whether the log handler should be flushed after logging each non-final result (including search result entries, search result references, and intermediate result messages).- Parameters:
flushAfterNonFinalResultMessages- Indicates whether the log handler should be flushed after logging each non-final result.
-
flushAfterFinalResultMessages
Indicates whether the log handler should be flushed after logging the final result for each operation. By default, the handler will be flushed after logging each final result, but not after logging requests or non-final results.- Returns:
trueif the log handler should be flushed after logging each final result, orfalseif not.
-
setFlushAfterFinalResultMessages
Specifies whether the log handler should be flushed after logging the final result for each operation.- Parameters:
flushAfterFinalResultMessages- Indicates whether the log handler should be flushed after logging each final result.
-
getSchema
Retrieves the schema that will be used to identify alternate names and OIDs for attributes whose values should be redacted. The LDAP SDK's default standard schema will be used by default.- Returns:
- The schema that will be used to identify alternate names and OIDs
for attributes whose values should be redacted, or
nullif no schema should be used.
-
setSchema
Specifies the schema that will be used to identify alternate names and OIDs for attributes whose values should be redacted.- Parameters:
schema- The schema that will be used to identify alternate names and OIDs for attributes whose values should be redacted. It may benullif no schema should be used.
-
toString
Retrieves a string representation of thisJSONLDAPConnectionLoggerPropertiesobject. -
toString
Appends a string representation of thisJSONLDAPConnectionLoggerPropertiesobject to the provided buffer.- Parameters:
buffer- The buffer to which the information should be appended. It must not benull.
-