public class FormattedLogMsg extends Object
The idea is to build up a message and then call printMessage(), after which the contents of the message will be cleared and the formatter can be used again to output more messages.
Constructor and Description |
---|
FormattedLogMsg()
Use this constructor if you dont intended to write to a Logger
|
FormattedLogMsg(org.apache.log4j.Logger log) |
Modifier and Type | Method and Description |
---|---|
void |
add(Object message) |
void |
add(Object message,
int indentLevel) |
void |
addAll(Collection<String> collection) |
void |
outputHeader(String header) |
void |
outputProperty(String propertyDesc) |
void |
outputProperty(String propertyDesc,
String propertyValue) |
void |
outputProperty(String propertyDesc,
String propertyValue,
int indentLevel) |
void |
outputProperty(String propertyDesc,
String propertyValue,
String splitStr) |
void |
outputProperty(String propertyDesc,
String propertyValue,
String splitStr,
int indentLevel) |
void |
printMessage(org.apache.log4j.Level logLevel)
Prints the contents of the current formatted messages to the Logger, using the specified
LogLevel.
|
void |
printMessage(org.apache.log4j.Level logLevel,
boolean useStars)
Prints the contents of the current formatted messages to the Logger, using the specified
LogLevel.
|
String |
toString()
This will return the FormattedLogMsg as a String.
|
public FormattedLogMsg()
public FormattedLogMsg(org.apache.log4j.Logger log)
public void add(Object message)
public void add(Object message, int indentLevel)
public void addAll(Collection<String> collection)
public void outputProperty(String propertyDesc)
public void outputProperty(String propertyDesc, String propertyValue, String splitStr)
public void outputProperty(String propertyDesc, String propertyValue, int indentLevel)
public void outputProperty(String propertyDesc, String propertyValue, String splitStr, int indentLevel)
public void outputHeader(String header)
public void printMessage(org.apache.log4j.Level logLevel)
The messages data will be cleared after this call, ready for new message output.
logLevel
- the log4j log level to output aspublic void printMessage(org.apache.log4j.Level logLevel, boolean useStars)
The messages data will be cleared after this call, ready for new output.
logLevel
- the log4j log level to output asuseStars
- if true * characters will be placed around the message outputCopyright © 2002-2015 Atlassian. All Rights Reserved.