public final class LogUtils extends Object
Modifier and Type | Method and Description |
---|---|
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 |
newLogEvent(org.slf4j.Marker marker,
LogLevel level,
String message,
Object[] argumentArray,
Throwable throwable,
long timeStamp)
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. |
public static LogEvent newLogEvent(org.slf4j.Marker marker, LogLevel level, String message, Object[] argumentArray, Throwable throwable)
LogEvent
instance based on the passed parameters.marker
- the log markerlevel
- the log levelmessage
- the log messageargumentArray
- the event arguments to insert in the messagethrowable
- the throwable associated to the eventLogEvent
public static LogEvent newLogEvent(org.slf4j.Marker marker, LogLevel level, String message, Object[] argumentArray, Throwable throwable, long timeStamp)
LogEvent
instance based on the passed parameters.marker
- the log markerlevel
- the log levelmessage
- the log messageargumentArray
- the event arguments to insert in the messagethrowable
- the throwable associated to the eventtimeStamp
- the number of milliseconds elapsed from 1/1/1970 until logging event was created.LogEvent
public static LogEvent translate(LogEvent logEvent, String translatedMessage)
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.
Copyright © 2004–2022 XWiki. All rights reserved.