public class TextDebugLogPublisher extends DebugLogPublisher<FileBasedDebugLogPublisherCfg> implements ConfigurationChangeListener<FileBasedDebugLogPublisherCfg>, ConfigurationAddListener<DebugTargetCfg>, ConfigurationDeleteListener<DebugTargetCfg>
Constructor and Description |
---|
TextDebugLogPublisher() |
Modifier and Type | Method and Description |
---|---|
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationAdd(DebugTargetCfg config)
Adds a new configuration to this add listener.
|
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationChange(FileBasedDebugLogPublisherCfg config)
Applies the configuration changes to this change listener.
|
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationDelete(DebugTargetCfg config)
Deletes an existing configuration from this delete listener.
|
void |
close()
Close this publisher.
|
DN |
getDN()
Gets the DN of the configuration entry for this log publisher.
|
void |
initializeLogPublisher(FileBasedDebugLogPublisherCfg config,
ServerContext serverContext)
Initializes this publisher provider based on the information in the
provided debug publisher configuration.
|
boolean |
isConfigurationAcceptable(FileBasedDebugLogPublisherCfg config,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this log
publisher.
|
boolean |
isConfigurationAddAcceptable(DebugTargetCfg config,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed addition of a new configuration is
acceptable to this add listener.
|
boolean |
isConfigurationChangeAcceptable(FileBasedDebugLogPublisherCfg config,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is
acceptable to this change listener.
|
boolean |
isConfigurationDeleteAcceptable(DebugTargetCfg config,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed deletion of an existing
configuration is acceptable to this delete listener.
|
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 TextDebugLogPublisher()
public boolean isConfigurationAcceptable(FileBasedDebugLogPublisherCfg config, List<LocalizableMessage> unacceptableReasons)
DebugLogPublisher
isConfigurationAcceptable
in interface LogPublisher<FileBasedDebugLogPublisherCfg>
isConfigurationAcceptable
in class DebugLogPublisher<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(FileBasedDebugLogPublisherCfg config, ServerContext serverContext) throws org.forgerock.opendj.config.server.ConfigException, InitializationException
LogPublisher
initializeLogPublisher
in interface LogPublisher<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(FileBasedDebugLogPublisherCfg config, List<LocalizableMessage> unacceptableReasons)
ConfigurationChangeListener
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<FileBasedDebugLogPublisherCfg>
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 org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationChange(FileBasedDebugLogPublisherCfg config)
ConfigurationChangeListener
applyConfigurationChange
in interface ConfigurationChangeListener<FileBasedDebugLogPublisherCfg>
config
- The new configuration containing the changes.public boolean isConfigurationAddAcceptable(DebugTargetCfg config, List<LocalizableMessage> unacceptableReasons)
ConfigurationAddListener
isConfigurationAddAcceptable
in interface ConfigurationAddListener<DebugTargetCfg>
config
- The configuration that will be added.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.true
if the proposed addition is
acceptable, or false
if it is not.public boolean isConfigurationDeleteAcceptable(DebugTargetCfg config, List<LocalizableMessage> unacceptableReasons)
ConfigurationDeleteListener
isConfigurationDeleteAcceptable
in interface ConfigurationDeleteListener<DebugTargetCfg>
config
- The configuration that will be deleted.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.true
if the proposed deletion is
acceptable, or false
if it is not.public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationAdd(DebugTargetCfg config)
ConfigurationAddListener
applyConfigurationAdd
in interface ConfigurationAddListener<DebugTargetCfg>
config
- The configuration that will be added.public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationDelete(DebugTargetCfg config)
ConfigurationDeleteListener
applyConfigurationDelete
in interface ConfigurationDeleteListener<DebugTargetCfg>
config
- The existing configuration that will be deleted.public void trace(TraceSettings settings, String signature, String sourceLocation, String msg, StackTraceElement[] stackTrace)
DebugLogPublisher
trace
in class DebugLogPublisher<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<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<FileBasedDebugLogPublisherCfg>
public DN getDN()
LogPublisher
getDN
in interface LogPublisher<FileBasedDebugLogPublisherCfg>
Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.