net.directj.jlogger
Interface Formatter

All Known Implementing Classes:
DefaultFormatter, HtmlFormatter, PatternFormatter, XmlFormatter

public interface Formatter

This is a simple common interface for the jlogger tools that specify how data is written. Moreover, it contain method for special format that need footer and header information, like XML or HTML.

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

Method Summary
 java.lang.String getFooter()
          Returns the footer information of the formatter.
 java.lang.String getHeader()
          Returns the header information of the formatter.
 java.lang.String transform(LogRecord _record)
          Transforms the given logging info with a special format.
 

Method Detail

transform

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

Parameters:
_record - The log record, where logging information are stored.
Returns:
String - The String that has been created using the given logging information.

getHeader

public java.lang.String getHeader()
Returns the header information of the formatter. Usefull for file that need header, like xml or html. Other formatter will return an empty string. 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.

Returns:
String - The formatter header.

getFooter

public java.lang.String getFooter()
Returns the footer information of the formatter. Usefull for file that need header, like xml or html. Other formatter will return an empty string. 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.

Returns:
String - The formatter footer.


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