Class Overview
A LogRecord to be used with the LogMonitorAdapter
Summary
[Expand]
Inherited Methods |
From class
org.apache.log4j.lf5.LogRecord
String
|
getCategory()
Get the category asscociated with this LogRecord.
|
LogLevel
|
getLevel()
Get the level of this LogRecord.
|
String
|
getLocation()
Get the location in code where this LogRecord originated.
|
String
|
getMessage()
Get the message asscociated with this LogRecord.
|
long
|
getMillis()
Get the event time of this record in milliseconds from 1970.
|
String
|
getNDC()
Get the NDC (nested diagnostic context) for this record.
|
synchronized
static
long
|
getNextId()
|
long
|
getSequenceNumber()
Get the sequence number associated with this LogRecord.
|
String
|
getThreadDescription()
Get the thread description asscociated with this LogRecord.
|
Throwable
|
getThrown()
Get the Throwable associated with this LogRecord.
|
String
|
getThrownStackTrace()
Get the stack trace in a String-based format for the associated Throwable
of this LogRecord.
|
boolean
|
hasThrown()
|
boolean
|
isFatal()
|
abstract
boolean
|
isSevereLevel()
Abstract method.
|
synchronized
static
void
|
resetSequenceNumber()
Resets that sequence number to 0.
|
void
|
setCategory(String category)
Set the category associated with this LogRecord.
|
void
|
setLevel(LogLevel level)
Set the level of this LogRecord.
|
void
|
setLocation(String location)
Set the location in code where this LogRecord originated.
|
void
|
setMessage(String message)
Set the message associated with this LogRecord.
|
void
|
setMillis(long millis)
Set the event time of this record.
|
void
|
setNDC(String ndc)
Set the NDC (nested diagnostic context) for this record.
|
void
|
setSequenceNumber(long number)
Set the sequence number assocsiated with this LogRecord.
|
void
|
setThreadDescription(String threadDescription)
Set the thread description associated with this LogRecord.
|
void
|
setThrown(Throwable thrown)
Set the Throwable associated with this LogRecord.
|
void
|
setThrownStackTrace(String trace)
Set the ThrownStackTrace for the log record.
|
String
|
toString()
Return a String representation of this LogRecord.
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
public
AdapterLogRecord
()
Public Methods
public
static
LogLevel
getSevereLevel
()
public
boolean
isSevereLevel
()
Abstract method. Must be overridden to indicate what log level
to show in red.
public
void
setCategory
(String category)
Set the category associated with this LogRecord. A category represents
a hierarchical dot (".") separated namespace for messages.
The definition of a category is application specific, but a common convention
is as follows:
When logging messages
for a particluar class you can use its class name:
com.thoughtworks.framework.servlet.ServletServiceBroker.
Futhermore, to log a message for a particular method in a class
add the method name:
com.thoughtworks.framework.servlet.ServletServiceBroker.init().
Parameters
category
| The category for this record. |
public
static
void
setSevereLevel
(LogLevel level)
Protected Methods
protected
String
getLocationInfo
(String category)
protected
String
parseLine
(String trace, String category)
protected
String
stackTraceToString
(Throwable t)