Package java.util.logging
Class XMLFormatter
- java.lang.Object
-
- java.util.logging.Formatter
-
- java.util.logging.XMLFormatter
-
public class XMLFormatter extends Formatter
Formatter to convert aLogRecordinto an XML string. The DTD specified in Appendix A to the Java Logging APIs specification is used.XMLFormatteruses the output handler's encoding if it is specified, otherwise the default platform encoding is used instead. UTF-8 is the recommended encoding.
-
-
Constructor Summary
Constructors Constructor Description XMLFormatter()Constructs a newXMLFormatter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringformat(LogRecord r)Converts aLogRecordinto an XML string.StringgetHead(Handler h)Returns the header string for a set of log records formatted as XML strings, using the output handler's encoding if it is defined, otherwise using the default platform encoding.StringgetTail(Handler h)Returns the tail string for a set of log records formatted as XML strings.-
Methods inherited from class java.util.logging.Formatter
formatMessage
-
-
-
-
Method Detail
-
getHead
public String getHead(Handler h)
Returns the header string for a set of log records formatted as XML strings, using the output handler's encoding if it is defined, otherwise using the default platform encoding.
-
-