| java.lang.Object org.apache.log.format.XMLFormatter
XMLFormatter | public class XMLFormatter implements Formatter,org.apache.log.Formatter(Code) | | Basic XML formatter that writes out a basic XML-ified log event.
Note that this formatter assumes that the category and context
values will produce strings that do not need to be escaped in XML.
author: Peter Donald |
Method Summary | |
public String | format(LogEvent event) Format log event into string. | public void | setPrintCategory(boolean printCategory) Print out category field to log. | public void | setPrintContext(boolean printContext) Print out context field to log. | public void | setPrintException(boolean printException) Print out exception field to log. | public void | setPrintMessage(boolean printMessage) Print out message field to log. | public void | setPrintPriority(boolean printPriority) Print out priority field to log. | public void | setPrintRelativeTime(boolean printRelativeTime) Print out relativeTime field to log. | public void | setPrintTime(boolean printTime) Print out time field to log. |
format | public String format(LogEvent event)(Code) | | Format log event into string.
Parameters: event - the event the formatted string |
setPrintCategory | public void setPrintCategory(boolean printCategory)(Code) | | Print out category field to log.
Parameters: printCategory - true to print category, false otherwise |
setPrintContext | public void setPrintContext(boolean printContext)(Code) | | Print out context field to log.
Parameters: printContext - true to print context, false otherwise |
setPrintException | public void setPrintException(boolean printException)(Code) | | Print out exception field to log.
Parameters: printException - true to print exception, false otherwise |
setPrintMessage | public void setPrintMessage(boolean printMessage)(Code) | | Print out message field to log.
Parameters: printMessage - true to print message, false otherwise |
setPrintPriority | public void setPrintPriority(boolean printPriority)(Code) | | Print out priority field to log.
Parameters: printPriority - true to print priority, false otherwise |
setPrintRelativeTime | public void setPrintRelativeTime(boolean printRelativeTime)(Code) | | Print out relativeTime field to log.
Parameters: printRelativeTime - true to print relativeTime, false otherwise |
setPrintTime | public void setPrintTime(boolean printTime)(Code) | | Print out time field to log.
Parameters: printTime - true to print time, false otherwise |
|
|