public class Tracer extends java.lang.Object implements Loggable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
INFO_FILES |
Constructor and Description |
---|
Tracer()
Create trace record that will be filled in from the log.
|
Tracer(java.lang.String msg)
Create a new debug record.
|
Modifier and Type | Method and Description |
---|---|
void |
dumpLog(java.lang.StringBuffer sb,
boolean verbose)
Write the object into the string buffer for log dumping.
|
boolean |
equals(java.lang.Object obj)
Override Object.equals
|
int |
getLogSize() |
java.lang.String |
getMessage() |
static java.lang.String |
getStackTrace(java.lang.Throwable t) |
long |
getTransactionId() |
int |
hashCode()
Just in case it's ever used as a hash key.
|
long |
log(LogManager logManager)
Convenience method to create a log entry containing this trace msg.
|
static java.util.logging.Level |
parseLevel(EnvironmentImpl envImpl,
ConfigParam configParam)
Parse a logging level config parameter, and return a more explanatory
error message if it doesn't parse.
|
void |
readFromLog(java.nio.ByteBuffer itemBuffer,
byte entryTypeVersion)
Initialize this object from the data in itemBuf.
|
java.lang.String |
toString() |
static void |
trace(EnvironmentImpl envImpl,
java.lang.String sourceClass,
java.lang.String sourceMethod,
java.lang.String msg,
java.lang.Throwable t)
Logger method for recording an exception and stacktrace.
|
static void |
trace(java.util.logging.Level logLevel,
EnvironmentImpl envImpl,
java.lang.String msg)
Logger method for recording a general message.
|
void |
writeToLog(java.nio.ByteBuffer logBuffer)
Serialize this object into the buffer.
|
public static final java.lang.String INFO_FILES
public Tracer(java.lang.String msg)
public Tracer()
public static void trace(java.util.logging.Level logLevel, EnvironmentImpl envImpl, java.lang.String msg)
public static void trace(EnvironmentImpl envImpl, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String msg, java.lang.Throwable t)
public static java.util.logging.Level parseLevel(EnvironmentImpl envImpl, ConfigParam configParam) throws DatabaseException
DatabaseException
public java.lang.String getMessage()
public static java.lang.String getStackTrace(java.lang.Throwable t)
public long log(LogManager logManager) throws DatabaseException
DatabaseException
public int getLogSize()
getLogSize
in interface Loggable
Loggable.getLogSize()
public void writeToLog(java.nio.ByteBuffer logBuffer)
Loggable
writeToLog
in interface Loggable
logBuffer
- is the destination bufferLoggable.writeToLog(java.nio.ByteBuffer)
public void readFromLog(java.nio.ByteBuffer itemBuffer, byte entryTypeVersion)
Loggable
readFromLog
in interface Loggable
Loggable.readFromLog(java.nio.ByteBuffer, byte)
public void dumpLog(java.lang.StringBuffer sb, boolean verbose)
Loggable
dumpLog
in interface Loggable
sb
- destination string bufferverbose
- if true, dump the full, verbose versionLoggable.dumpLog(java.lang.StringBuffer, boolean)
public long getTransactionId()
getTransactionId
in interface Loggable
Loggable.getTransactionId()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object