net.directj.jlogger
Class HtmlFormatter

java.lang.Object
  |
  +--net.directj.jlogger.HtmlFormatter
All Implemented Interfaces:
Formatter

public class HtmlFormatter
extends java.lang.Object
implements Formatter

This is the html formatter, used to format the logging information. It specify how data is written.

Version:
0.1.2
Author:
CARTAPANIS Alexandre <earendil@jprolog.net>

Constructor Summary
HtmlFormatter()
           
 
Method Summary
 boolean equals(java.lang.Object _obj)
          Indicates whether some other object is "equal to" this one.
 java.lang.String getFooter()
          Called at the output destruction.
 java.lang.String getHeader()
          Called at the output creation.
 int hashCode()
          Returns a hash code value for the object.
 java.lang.String transform(LogRecord _record)
          Transforms the given logging info with a special format.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlFormatter

public HtmlFormatter()
Method Detail

getHeader

public java.lang.String getHeader()
Called at the output creation. Usefull for file that need header, like xml or html. As a developper you don't have to take care of this method, it is automatically called by the LogManager that is in charge of the formatter.

Specified by:
getHeader in interface Formatter
Returns:
String - The formatter header.

getFooter

public java.lang.String getFooter()
Called at the output destruction. Usefull for file that need footer, like xml or html. As a developper you don't have to take care of this method, it is automatically called by the LogManager that is in charge of the formatter.

Specified by:
getFooter in interface Formatter
Returns:
String - The formatter footer.

transform

public java.lang.String transform(LogRecord _record)
Transforms the given logging info with a special format.

Specified by:
transform in interface Formatter
Parameters:
_record - The log record, where logging information are stored.
Returns:
String - The String that has been created using the given logging information.

equals

public boolean equals(java.lang.Object _obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
_obj - The reference object with which to compare.
Returns:
boolean - True if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class java.lang.Object
Returns:
int - A hash code value for this object.


Copyright 2002 CARTAPANIS Alexandre
This page was last updated on May 10 2003