org.opends.server.loggers.debug
Class DebugTracer

java.lang.Object
  extended by org.opends.server.loggers.debug.DebugTracer

public class DebugTracer
extends java.lang.Object

Class for source-code tracing at the method level. One DebugTracer instance exists for each Java class using tracing. Tracer must be registered with the DebugLogger. Logging is always done at a level basis, with debug log messages exceeding the trace threshold being traced, others being discarded.


Method Summary
 void debugCaught(LogLevel level, java.lang.Throwable ex)
          Log an cought exception.
 void debugConstructor(LogLevel level, java.lang.Object... args)
          Log an constructor execution event.
 void debugData(LogLevel level, byte[] data)
          Log raw data in the form of a byte array.
 void debugData(LogLevel level, java.nio.ByteBuffer buffer)
          Log raw data in the form of a ByteBuffer.
 void debugError(java.lang.String msg)
          Log an arbitrary event at the error level.
 void debugError(java.lang.String msg, java.lang.Object... msgArgs)
          Log an arbitrary event at the error level.
 void debugInfo(java.lang.String msg)
          Log an arbitrary event at the info level.
 void debugInfo(java.lang.String msg, java.lang.Object... msgArgs)
          Log an arbitrary event at the info level.
 void debugJEAccess(LogLevel level, com.sleepycat.je.OperationStatus status, com.sleepycat.je.Database database, com.sleepycat.je.Transaction txn, com.sleepycat.je.DatabaseEntry key, com.sleepycat.je.DatabaseEntry data)
          Log a JE database access event.
 void debugMessage(LogLevel level, java.lang.String msg)
          Log an arbitrary event.
 void debugMessage(LogLevel level, java.lang.String msg, java.lang.Object... msgArgs)
          Log an arbitrary event.
 void debugMethodEntry(LogLevel level, java.lang.Object obj, java.lang.Object... args)
          Log an non static method entry event.
 void debugProtocolElement(LogLevel level, ProtocolElement element)
          Log a protocol element.
 void debugReturn(LogLevel level, java.lang.Object ret)
          Log a return from a method call event.
 void debugStaticMethodEntry(LogLevel level, java.lang.Object... args)
          Log an static method entry event.
 void debugThrown(LogLevel level, java.lang.Throwable ex)
          Log an exception thrown from a method.
 void debugVerbose(java.lang.String msg)
          Log an arbitrary event at the verbose level.
 void debugVerbose(java.lang.String msg, java.lang.Object... msgArgs)
          Log an arbitrary event at the verbose level.
 void debugWarning(java.lang.String msg)
          Log an arbitrary event at the warning level.
 void debugWarning(java.lang.String msg, java.lang.Object... msgArgs)
          Log an arbitrary event at the warning level.
 java.lang.String getTracedClassName()
          Gets the name of the class this tracer traces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

debugConstructor

public void debugConstructor(LogLevel level,
                             java.lang.Object... args)
Log an constructor execution event.

Parameters:
level - The level of the message being logged.
args - The arguments passed to the constructor.

debugMethodEntry

public void debugMethodEntry(LogLevel level,
                             java.lang.Object obj,
                             java.lang.Object... args)
Log an non static method entry event.

Parameters:
level - The level of the message being logged.
obj - The object type instance the method is a member of.
args - The arguments passed to the method.

debugStaticMethodEntry

public void debugStaticMethodEntry(LogLevel level,
                                   java.lang.Object... args)
Log an static method entry event.

Parameters:
level - The level of the message being logged.
args - The arguments passed to the method.

debugReturn

public void debugReturn(LogLevel level,
                        java.lang.Object ret)
Log a return from a method call event.

Parameters:
level - The level of the message being logged.
ret - The value being returned from the method.

debugThrown

public void debugThrown(LogLevel level,
                        java.lang.Throwable ex)
Log an exception thrown from a method.

Parameters:
level - The level of the message being logged.
ex - The exception being thrown.

debugVerbose

public void debugVerbose(java.lang.String msg)
Log an arbitrary event at the verbose level. Same as debugMessage(DebugLogLevel.ERROR, msg)

Parameters:
msg - message to format and log.

debugVerbose

public void debugVerbose(java.lang.String msg,
                         java.lang.Object... msgArgs)
Log an arbitrary event at the verbose level. Same as debugMessage(DebugLogLevel.ERROR, msg, msgArgs...)

Parameters:
msg - message to format and log.
msgArgs - arguments to place into the format string.

debugInfo

public void debugInfo(java.lang.String msg)
Log an arbitrary event at the info level. Same as debugMessage(DebugLogLevel.ERROR, msg)

Parameters:
msg - message to format and log.

debugInfo

public void debugInfo(java.lang.String msg,
                      java.lang.Object... msgArgs)
Log an arbitrary event at the info level. Same as debugMessage(DebugLogLevel.ERROR, msg, msgArgs...)

Parameters:
msg - message to format and log.
msgArgs - arguments to place into the format string.

debugWarning

public void debugWarning(java.lang.String msg)
Log an arbitrary event at the warning level. Same as debugMessage(DebugLogLevel.ERROR, msg)

Parameters:
msg - message to format and log.

debugWarning

public void debugWarning(java.lang.String msg,
                         java.lang.Object... msgArgs)
Log an arbitrary event at the warning level. Same as debugMessage(DebugLogLevel.ERROR, msg, msgArgs...)

Parameters:
msg - message to format and log.
msgArgs - arguments to place into the format string.

debugError

public void debugError(java.lang.String msg)
Log an arbitrary event at the error level. Same as debugMessage(DebugLogLevel.ERROR, msg)

Parameters:
msg - message to format and log.

debugError

public void debugError(java.lang.String msg,
                       java.lang.Object... msgArgs)
Log an arbitrary event at the error level. Same as debugMessage(DebugLogLevel.ERROR, msg, msgArgs...)

Parameters:
msg - message to format and log.
msgArgs - arguments to place into the format string.

debugMessage

public void debugMessage(LogLevel level,
                         java.lang.String msg)
Log an arbitrary event.

Parameters:
level - the level of the log message.
msg - message to format and log.

debugMessage

public void debugMessage(LogLevel level,
                         java.lang.String msg,
                         java.lang.Object... msgArgs)
Log an arbitrary event.

Parameters:
level - the level of the log message.
msg - message to format and log.
msgArgs - arguments to place into the format string.

debugCaught

public void debugCaught(LogLevel level,
                        java.lang.Throwable ex)
Log an cought exception.

Parameters:
level - the level of the log message.
ex - the exception caught.

debugJEAccess

public void debugJEAccess(LogLevel level,
                          com.sleepycat.je.OperationStatus status,
                          com.sleepycat.je.Database database,
                          com.sleepycat.je.Transaction txn,
                          com.sleepycat.je.DatabaseEntry key,
                          com.sleepycat.je.DatabaseEntry data)
Log a JE database access event.

Parameters:
level - the level of the log message.
status - status of the JE operation.
database - the database handle.
txn - transaction handle (may be null).
key - the key to dump.
data - the data to dump.

debugData

public void debugData(LogLevel level,
                      byte[] data)
Log raw data in the form of a byte array.

Parameters:
level - the level of the log message.
data - the data to dump.

debugProtocolElement

public void debugProtocolElement(LogLevel level,
                                 ProtocolElement element)
Log a protocol element.

Parameters:
level - the level of the log message.
element - the protocol element to dump.

debugData

public void debugData(LogLevel level,
                      java.nio.ByteBuffer buffer)
Log raw data in the form of a ByteBuffer.

Parameters:
level - the level of the log message.
buffer - the data to dump.

getTracedClassName

public java.lang.String getTracedClassName()
Gets the name of the class this tracer traces.

Returns:
The name of the class this tracer traces.