public class AdapterLogRecord extends LogRecord
A LogRecord to be used with the LogMonitorAdapter
Modifier and Type | Field and Description |
---|---|
private static PrintWriter |
pw |
private static LogLevel |
severeLevel |
private static StringWriter |
sw |
Constructor and Description |
---|
AdapterLogRecord() |
Modifier and Type | Method and Description |
---|---|
protected String |
getLocationInfo(String category) |
static LogLevel |
getSevereLevel() |
boolean |
isSevereLevel()
Abstract method.
|
protected String |
parseLine(String trace,
String category) |
void |
setCategory(String category)
Set the category associated with this LogRecord.
|
static void |
setSevereLevel(LogLevel level) |
protected String |
stackTraceToString(Throwable t) |
getCategory, getLevel, getLocation, getMessage, getMillis, getNDC, getNextId, getSequenceNumber, getThreadDescription, getThrown, getThrownStackTrace, hasThrown, isFatal, resetSequenceNumber, setLevel, setLocation, setMessage, setMillis, setNDC, setSequenceNumber, setThreadDescription, setThrown, setThrownStackTrace, toString
private static LogLevel severeLevel
private static StringWriter sw
private static PrintWriter pw
public AdapterLogRecord()
public void setCategory(String category)
LogRecord
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().
setCategory
in class LogRecord
category
- The category for this record.LogRecord.getCategory()
public boolean isSevereLevel()
LogRecord
isSevereLevel
in class LogRecord
public static void setSevereLevel(LogLevel level)
public static LogLevel getSevereLevel()
protected String getLocationInfo(String category)
protected String stackTraceToString(Throwable t)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses