momelog
Class LogEvent

java.lang.Object
  extended by momelog.LogEvent

public class LogEvent
extends Object

Class representing logging event. It contains following readonly properties:

All of the above properties are read only. They can be obtained by respective getters.

Version:
1.0
Author:
Sergio Morozov

Method Summary
 String getCategory()
          Returns category of logger generated this logging event.
 String getMessage()
          Returns message of this logging event.
 String getThreadName()
          Returns name of thread, in which this logging event was generated (as returned from Thread.getName() method).
 Throwable getThrowable()
          Returns error of this logging event.
 long getTimestamp()
          Returns long integer indicating time of this logging event generation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCategory

public String getCategory()
Returns category of logger generated this logging event.

Returns:
the category of logger generated this logging event.

getThrowable

public Throwable getThrowable()
Returns error of this logging event.

Returns:
the error of this logging event.

getMessage

public String getMessage()
Returns message of this logging event.

Returns:
the message of this logging event.

getTimestamp

public long getTimestamp()
Returns long integer indicating time of this logging event generation. It returns the number of milliseconds from some base time point till LogEvent generation time. By default, base time point is set to time of Logger class loading. It can be set to now by invoking Logger.resetBaseTime() static method.

Returns:
long integer indicating time, when this logging event was generated.

getThreadName

public String getThreadName()
Returns name of thread, in which this logging event was generated (as returned from Thread.getName() method).

Returns:
name of thread, in which this logging event was generated.