T
- The type of debug log publisher configuration handled by this log publisher implementation.@PublicAPI(stability=VOLATILE, mayInstantiate=false, mayExtend=true, mayInvoke=false) public abstract class DebugLogPublisher<T extends DebugLogPublisherCfg> extends Object implements LogPublisher<T>
Modifier | Constructor and Description |
---|---|
protected |
DebugLogPublisher()
Construct a default configuration where the global scope will only log at the ERROR level.
|
Modifier and Type | Method and Description |
---|---|
void |
addTraceSettings(String scope,
TraceSettings settings)
Adds a trace settings to the current set for a specified scope.
|
boolean |
isConfigurationAcceptable(T configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this log publisher.
|
abstract void |
trace(TraceSettings settings,
String signature,
String sourceLocation,
String msg,
StackTraceElement[] stackTrace)
Log an arbitrary event in a method.
|
abstract void |
traceException(TraceSettings settings,
String signature,
String sourceLocation,
String msg,
Throwable ex,
StackTraceElement[] stackTrace)
Log a caught exception in a method.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getDN, initializeLogPublisher
protected DebugLogPublisher()
public boolean isConfigurationAcceptable(T configuration, List<LocalizableMessage> unacceptableReasons)
LogPublisher
isConfigurationAcceptable
in interface LogPublisher<T extends DebugLogPublisherCfg>
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 final void addTraceSettings(String scope, TraceSettings settings)
scope
- The scope for which to set the trace settings. This should be a fully-qualified class name, or
null
to set the trace settings for the global scope.settings
- The trace settings for the specified scope.public abstract void trace(TraceSettings settings, String signature, String sourceLocation, String msg, StackTraceElement[] stackTrace)
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 abstract void traceException(TraceSettings settings, String signature, String sourceLocation, String msg, Throwable ex, StackTraceElement[] stackTrace)
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.Copyright 2010-2022 ForgeRock AS.