org.apache.cxf.management.web.logging
Class LogRecord

java.lang.Object
  extended by org.apache.cxf.management.web.logging.LogRecord

public class LogRecord
extends Object

Log entry serializable to XML. Based on common set of LogRecord and org.apache.log4j.spi.LoggingEvent attributes.

LogRecord are never null; if some attributes are not set (e.g. logger name, or rendered cause taken from Throwable) empty strings are returned.


Constructor Summary
LogRecord()
           
LogRecord(LogRecord copy)
           
LogRecord(String id)
           
 
Method Summary
 boolean equals(Object obj)
           
static LogRecord fromJUL(LogRecord julRecord)
          Creates this object from JUL LogRecord.
 Date getDate()
           
 String getId()
           
 LogLevel getLevel()
           
 String getLoggerName()
           
 String getMessage()
          Formatted message with parameters filled in.
 String getThreadName()
           
 String getThrowable()
          Full stack trace of Throwable associated with log record.
 int hashCode()
           
 void setDate(Date date)
           
 void setLevel(LogLevel level)
           
 void setLoggerName(String loggerName)
           
 void setMessage(String renderedMessage)
           
 void setThreadName(String threadName)
           
 void setThrowable(String throwable)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogRecord

public LogRecord()

LogRecord

public LogRecord(String id)

LogRecord

public LogRecord(LogRecord copy)
Method Detail

fromJUL

public static LogRecord fromJUL(LogRecord julRecord)
Creates this object from JUL LogRecord. Most attributes are copied, others are converted as follows: raw message is formatted with parameters using MessageFormat, attached throwable has full stack trace dumped, and log levels are mapped as specified in LogRecord.

Parameters:
julRecord - log record to convert.
Returns:
conversion result.

getId

public String getId()

getDate

public Date getDate()

setDate

public void setDate(Date date)

getLevel

public LogLevel getLevel()

setLevel

public void setLevel(LogLevel level)

getMessage

public String getMessage()
Formatted message with parameters filled in.


setMessage

public void setMessage(String renderedMessage)

getLoggerName

public String getLoggerName()

setLoggerName

public void setLoggerName(String loggerName)

getThreadName

public String getThreadName()

setThreadName

public void setThreadName(String threadName)

getThrowable

public String getThrowable()
Full stack trace of Throwable associated with log record.


setThrowable

public void setThrowable(String throwable)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Apache CXF