Forward Computing and Control Pty. Ltd.
Logging Package V1.3.0

2004/11/22

au.com.forward.logging
Class LoggingXMLFormatter

java.lang.Object
  extended by java.util.logging.Formatter
      extended by au.com.forward.logging.RobustFormatter
          extended by au.com.forward.logging.LoggingXMLFormatter

public class LoggingXMLFormatter
extends RobustFormatter

This class provides a robust xml formatter with stylesheet.

Author:
Matthew Ford

Constructor Summary
LoggingXMLFormatter()
           
 
Method Summary
 java.lang.String format(java.util.logging.LogRecord record)
          Format the given message to XML.
 java.lang.String getHead(java.util.logging.Handler h)
          Return the header string for a set of XML formatted records.
 java.lang.String getTail(java.util.logging.Handler h)
          Return the tail string for a set of XML formatted records.
protected  java.lang.String newLineString()
          Returns the newLine setting for this class for XML
use \n for new lines in XML output
 
Methods inherited from class au.com.forward.logging.RobustFormatter
formatMessage, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingXMLFormatter

public LoggingXMLFormatter()
Method Detail

newLineString

protected java.lang.String newLineString()
Returns the newLine setting for this class for XML
use \n for new lines in XML output

Specified by:
newLineString in class RobustFormatter
Returns:
the string to use for new lines.

getHead

public java.lang.String getHead(java.util.logging.Handler h)
Return the header string for a set of XML formatted records.

Overrides:
getHead in class java.util.logging.Formatter
Parameters:
h - The target handler.
Returns:
header string

getTail

public java.lang.String getTail(java.util.logging.Handler h)
Return the tail string for a set of XML formatted records.

Overrides:
getTail in class java.util.logging.Formatter
Parameters:
h - The target handler.
Returns:
tail string

format

public java.lang.String format(java.util.logging.LogRecord record)
Format the given message to XML.

Specified by:
format in class java.util.logging.Formatter
Parameters:
record - the log record to be formatted.
Returns:
a formatted log record

Forward Computing and Control Pty. Ltd.
Logging Package V1.3.0

2004/11/22

Copyright ©2003, Forward Computing and Control Pty. Ltd
ACN 003 669 994   NSW Australia,   All Rights Reserved.
email:fcc@forward.com.au