public class TextDebugLogPublisher extends DebugLogPublisher<org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg> implements org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg>, org.forgerock.opendj.config.server.ConfigurationAddListener<org.forgerock.opendj.server.config.server.DebugTargetCfg>, org.forgerock.opendj.config.server.ConfigurationDeleteListener<org.forgerock.opendj.server.config.server.DebugTargetCfg>
Constructor and Description |
---|
TextDebugLogPublisher() |
Modifier and Type | Method and Description |
---|---|
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationAdd(org.forgerock.opendj.server.config.server.DebugTargetCfg config) |
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationChange(org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg config) |
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationDelete(org.forgerock.opendj.server.config.server.DebugTargetCfg config) |
void |
close()
Close this publisher.
|
org.forgerock.opendj.ldap.Dn |
getDN()
Gets the DN of the configuration entry for this log publisher.
|
void |
initializeLogPublisher(org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg config,
ServerContext serverContext)
Initializes this publisher provider based on the information in the provided debug publisher configuration.
|
boolean |
isConfigurationAcceptable(org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg config,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this log publisher.
|
boolean |
isConfigurationAddAcceptable(org.forgerock.opendj.server.config.server.DebugTargetCfg config,
List<LocalizableMessage> unacceptableReasons) |
boolean |
isConfigurationChangeAcceptable(org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg config,
List<LocalizableMessage> unacceptableReasons) |
boolean |
isConfigurationDeleteAcceptable(org.forgerock.opendj.server.config.server.DebugTargetCfg config,
List<LocalizableMessage> unacceptableReasons) |
void |
trace(TraceSettings settings,
String signature,
String sourceLocation,
String msg,
StackTraceElement[] stackTrace)
Log an arbitrary event in a method.
|
void |
traceException(TraceSettings settings,
String signature,
String sourceLocation,
String msg,
Throwable ex,
StackTraceElement[] stackTrace)
Log a caught exception in a method.
|
addTraceSettings
public boolean isConfigurationAcceptable(org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg config, List<LocalizableMessage> unacceptableReasons)
LogPublisher
isConfigurationAcceptable
in interface LogPublisher<org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg>
isConfigurationAcceptable
in class DebugLogPublisher<org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg>
config
- 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 void initializeLogPublisher(org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg config, ServerContext serverContext) throws org.forgerock.opendj.config.server.ConfigException, InitializationException
LogPublisher
initializeLogPublisher
in interface LogPublisher<org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg>
config
- The publisher configuration that contains the information to use to initialize this publisher.serverContext
- The server context.org.forgerock.opendj.config.server.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 isConfigurationChangeAcceptable(org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg config, List<LocalizableMessage> unacceptableReasons)
isConfigurationChangeAcceptable
in interface org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg>
public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationChange(org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg config)
applyConfigurationChange
in interface org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg>
public boolean isConfigurationAddAcceptable(org.forgerock.opendj.server.config.server.DebugTargetCfg config, List<LocalizableMessage> unacceptableReasons)
isConfigurationAddAcceptable
in interface org.forgerock.opendj.config.server.ConfigurationAddListener<org.forgerock.opendj.server.config.server.DebugTargetCfg>
public boolean isConfigurationDeleteAcceptable(org.forgerock.opendj.server.config.server.DebugTargetCfg config, List<LocalizableMessage> unacceptableReasons)
isConfigurationDeleteAcceptable
in interface org.forgerock.opendj.config.server.ConfigurationDeleteListener<org.forgerock.opendj.server.config.server.DebugTargetCfg>
public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationAdd(org.forgerock.opendj.server.config.server.DebugTargetCfg config)
applyConfigurationAdd
in interface org.forgerock.opendj.config.server.ConfigurationAddListener<org.forgerock.opendj.server.config.server.DebugTargetCfg>
public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationDelete(org.forgerock.opendj.server.config.server.DebugTargetCfg config)
applyConfigurationDelete
in interface org.forgerock.opendj.config.server.ConfigurationDeleteListener<org.forgerock.opendj.server.config.server.DebugTargetCfg>
public void trace(TraceSettings settings, String signature, String sourceLocation, String msg, StackTraceElement[] stackTrace)
DebugLogPublisher
trace
in class DebugLogPublisher<org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg>
settings
- The current trace settings in effect.signature
- The method signature.sourceLocation
- The location of the method in the source.msg
- The message to be logged.stackTrace
- The stack trace at the time the message is logged or null if its not available.public void traceException(TraceSettings settings, String signature, String sourceLocation, String msg, Throwable ex, StackTraceElement[] stackTrace)
DebugLogPublisher
traceException
in class DebugLogPublisher<org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg>
settings
- The current trace settings in effect.signature
- The method signature.sourceLocation
- The location of the method in the source.msg
- The message to be logged.ex
- The exception that was caught.stackTrace
- The stack trace at the time the exception is caught or null if its not available.public void close()
LogPublisher
close
in interface Closeable
close
in interface AutoCloseable
close
in interface LogPublisher<org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg>
public org.forgerock.opendj.ldap.Dn getDN()
LogPublisher
getDN
in interface LogPublisher<org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg>
Copyright © 2010–2017 ForgeRock AS. All rights reserved.