Android
java.util.logging
public class

java.util.logging.XMLFormatter

java.lang.Object
java.util.logging.Formatter
java.util.logging.XMLFormatter

Format a given LogRecord into string represents XML. The DTD specified in Appendix A to Java Logging APIs specification is used. XMLFormatter uses given Handler's encoding if has, otherwise uses default platform encoding instead. However, the UTF-8 is recommended encoding.

Summary

Public Constructors

            XMLFormatter()
Default constructor

Public Methods

          String  format(LogRecord r)
Format a LogRecord into string which represents XML
          String  getHead(Handler h)
Return the header string for XML, use given handler's encoding if has, other wise use default platform encoding
          String  getTail(Handler h)
Return the tail string for XML
Methods inherited from class java.util.logging.Formatter
Methods inherited from class java.lang.Object

Details

Public Constructors

public XMLFormatter()

Default constructor

Public Methods

public String format(LogRecord r)

Format a LogRecord into string which represents XML

Parameters

r the given LogRecord instance to be formatted

Returns

  • string which represents XML

public String getHead(Handler h)

Return the header string for XML, use given handler's encoding if has, other wise use default platform encoding

Parameters

h the given handler

Returns

  • the header string for XML

public String getTail(Handler h)

Return the tail string for XML

Parameters

h the given handler

Returns

  • the tail string for XML
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48