public class ConsoleDebugLogPublisher extends DebugLogPublisher<DebugLogPublisherCfg>
Constructor and Description |
---|
ConsoleDebugLogPublisher(PrintStream err)
Constructs a new ConsoleDebugLogPublisher that writes debug messages to the given PrintStream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this publisher.
|
Dn |
getDN()
Gets the DN of the configuration entry for this log publisher.
|
void |
initializeLogPublisher(DebugLogPublisherCfg config,
ServerContext serverContext)
Initializes this publisher provider based on the information in the provided debug publisher configuration.
|
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, isConfigurationAcceptable
public ConsoleDebugLogPublisher(PrintStream err)
err
- The PrintStream to write messages to.public void initializeLogPublisher(DebugLogPublisherCfg config, ServerContext serverContext) throws ConfigException, InitializationException
LogPublisher
config
- The publisher configuration that contains the information to use to initialize this publisher.serverContext
- The server context.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 void trace(TraceSettings settings, String signature, String sourceLocation, String msg, StackTraceElement[] stackTrace)
DebugLogPublisher
trace
in class DebugLogPublisher<DebugLogPublisherCfg>
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<DebugLogPublisherCfg>
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
public Dn getDN()
LogPublisher
Copyright 2010-2022 ForgeRock AS.