org.xwiki.logging.event
Class LogEvent

java.lang.Object
  extended by org.xwiki.logging.event.LogEvent
All Implemented Interfaces:
Event

public class LogEvent
extends Object
implements Event

Sent when logger is called.

Since:
3.2M1
Version:
$Id: 8f571326532b9dd1143fd683da65c7dd7ef8cb78 $

Constructor Summary
LogEvent()
          Matches any LogEvent.
LogEvent(LogLevel level, String message, Object[] argumentArray, Throwable throwable)
           
LogEvent(org.slf4j.Marker marker, LogLevel level, String message, Object[] argumentArray, Throwable throwable)
           
 
Method Summary
 boolean equals(Object object)
           
 Object[] getArgumentArray()
           
 String getFormattedMessage()
           
 LogLevel getLevel()
           
 org.slf4j.Marker getMarker()
           
 String getMessage()
           
 List<String> getMessageElements()
           
 Throwable getThrowable()
           
 String getTranslationKey()
           
 int hashCode()
           
 boolean matches(Object otherEvent)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogEvent

public LogEvent()
Matches any LogEvent.


LogEvent

public LogEvent(LogLevel level,
                String message,
                Object[] argumentArray,
                Throwable throwable)
Parameters:
level - the log level
message - the log message
argumentArray - the event arguments to insert in the message
throwable - the throwable associated to the event

LogEvent

public LogEvent(org.slf4j.Marker marker,
                LogLevel level,
                String message,
                Object[] argumentArray,
                Throwable throwable)
Parameters:
marker - the log marker
level - the log level
message - the log message
argumentArray - the event arguments to insert in the message
throwable - the throwable associated to the event
Since:
4.3M
Method Detail

getMarker

public org.slf4j.Marker getMarker()
Returns:
the log marker
Since:
4.3M1

getLevel

public LogLevel getLevel()
Returns:
the log level

getMessage

public String getMessage()
Returns:
the log message

getArgumentArray

public Object[] getArgumentArray()
Returns:
the event arguments to insert in the message

getThrowable

public Throwable getThrowable()
Returns:
the throwable associated to the event

getFormattedMessage

public String getFormattedMessage()
Returns:
the formated version of the message

getMessageElements

public List<String> getMessageElements()
Returns:
the log message cut in peaces
Since:
4.2M1

getTranslationKey

public String getTranslationKey()
Returns:
the translation key associated to the log
Since:
5.0M2

matches

public boolean matches(Object otherEvent)
Specified by:
matches in interface Event

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2004-2013 XWiki. All Rights Reserved.