org.xwiki.logging
Class LogUtils

java.lang.Object
  extended by org.xwiki.logging.LogUtils

public final class LogUtils
extends Object

Since:
5.4RC1
Version:
$Id: 1c46e1ac9014fea515f53bde0602853efc30693c $

Method Summary
static LogEvent newLogEvent(org.slf4j.Marker marker, LogLevel level, String message, Object[] argumentArray, Throwable throwable)
          Create and return a new LogEvent instance based on the passed parameters.
static LogEvent translate(LogEvent logEvent, String translatedMessage)
          Translate the passed LogEvent based on the passed translation message pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newLogEvent

public static LogEvent newLogEvent(org.slf4j.Marker marker,
                                   LogLevel level,
                                   String message,
                                   Object[] argumentArray,
                                   Throwable throwable)
Create and return a new LogEvent instance based on the passed parameters.

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
Returns:
the LogEvent

translate

public static LogEvent translate(LogEvent logEvent,
                                 String translatedMessage)
Translate the passed LogEvent based on the passed translation message pattern.

The translation message pattern use the same syntax than standard message pattern except that it's optionally possible to provide a custom index as in Some {1} translation {0} message in order to modify the order of the argument which can be required depending on the language.

Parameters:
logEvent - the LogEvent to translate
translatedMessage - the translated version of the LogEvent message
Returns:
the translated version of the passed LogEvent


Copyright © 2004–2014 XWiki. All rights reserved.