com.sun.faban.harness.agent
Class RemoteLogFormatter

java.lang.Object
  extended by java.util.logging.Formatter
      extended by java.util.logging.XMLFormatter
          extended by com.sun.faban.harness.agent.RemoteLogFormatter

public class RemoteLogFormatter
extends XMLFormatter

Formatter for formatting the logs to be sent to a log server. It adds a host name to the XML.


Constructor Summary
RemoteLogFormatter()
          Constructs the formatter.
 
Method Summary
 String format(LogRecord record)
          Formats the log record to the remote log format.
 String getHead(Handler h)
          Return the header string for a set of XML formatted records.
 String getTail(Handler h)
          Return the tail string for a set of XML formatted records.
 
Methods inherited from class java.util.logging.Formatter
formatMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteLogFormatter

public RemoteLogFormatter()
Constructs the formatter.

Method Detail

format

public String format(LogRecord record)
Formats the log record to the remote log format.

Overrides:
format in class XMLFormatter
Parameters:
record - The log record
Returns:
The log record with the host added to the log record.

getHead

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

Overrides:
getHead in class XMLFormatter
Parameters:
h - The target handler (can be null)
Returns:
an empty string

getTail

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

Overrides:
getTail in class XMLFormatter
Parameters:
h - The target handler (can be null)
Returns:
an empty string