Class XMLLogFormatter
Object
Formatter
FormatterImpl
TextLogFormatter
XMLLogFormatter
Formats LogRecords into XML/XHTML compliant text
Note: The GWT implementation of
Formatter is simply
public String formatMessage(LogRecord record) {
return format(record);
}
which seems naturally prone to causing grief through circular
references... (admittedly also not clear how to do things better).
Thus, instead of extending
ConsoleLogHandler to implement
formatting acceptable to XML, this extends
TextLogFormatter instead.
- Author:
- Christoph Hauert
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanfalseif XML/XHTML compliant encoding of log messages desired. -
Constructor Summary
ConstructorsConstructorDescriptionXMLLogFormatter(boolean showStackTraces) Construct a new formatter for log messages without XML/XHTML encoding.XMLLogFormatter(boolean showStackTraces, boolean isHTML) Construct a new formatter for log messages with XML/XHTML encoding, provided thatisHTMLisfalse. -
Method Summary
Methods inherited from class com.google.gwt.logging.impl.FormatterImpl
getRecordInfo, getStackTraceAsStringMethods inherited from class Formatter
formatMessage, getHead, getTail
-
Field Details
-
isXML
private boolean isXMLfalseif XML/XHTML compliant encoding of log messages desired.
-
-
Constructor Details
-
XMLLogFormatter
public XMLLogFormatter(boolean showStackTraces) Construct a new formatter for log messages without XML/XHTML encoding.- Parameters:
showStackTraces-trueto show stack traces
-
XMLLogFormatter
public XMLLogFormatter(boolean showStackTraces, boolean isHTML) Construct a new formatter for log messages with XML/XHTML encoding, provided thatisHTMLisfalse.- Parameters:
showStackTraces-trueto show stack tracesisHTML-trueto use HTML encoding
-
-
Method Details
-
format
If
isHTMLisfalsethe returned string is XML/XHTML compliant.- Overrides:
formatin classTextLogFormatter
-