|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ogf.graap.wsag.api.logging.LogMessage
public class LogMessage
A simple log message that can be used in conjunction with Log4J in order to improve logging speed. A LogMessage
takes a message and a number of arguments that are formated with MessageFormat
on demand, i.e. the
rendering of the resulting message will only take place if the message is really logged by the Log4J
framework, i.e. the log level is set accordingly.
Constructor Summary | |
---|---|
LogMessage(String message,
Object... params)
Creates a new log message. |
Method Summary | |
---|---|
static String |
format(String message,
Object... params)
Formats a log message to a string. |
static LogMessage |
getMessage(String message,
Object... params)
Creates a new log message. |
String |
toString()
Renders the message when required by Log4J, i.e. the message is finally printed to the log. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LogMessage(String message, Object... params)
message
- the message patternparams
- the message parametersMessageFormat.format(String, Object...)
Method Detail |
---|
public static LogMessage getMessage(String message, Object... params)
message
- the message patternparams
- the message parameters
LogEntry
MessageFormat.format(String, Object...)
public static String format(String message, Object... params)
message
- the message patternparams
- the message parameters
MessageFormat.format(String, Object...)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |