org.x4juli.formatter
Class SimpleFormatter

java.lang.Object
  extended byjava.util.logging.Formatter
      extended byorg.x4juli.global.components.AbstractFormatter
          extended byorg.x4juli.formatter.SimpleFormatter
All Implemented Interfaces:
Component, ExtendedFormatter, Formatter, OptionHandler

public class SimpleFormatter
extends AbstractFormatter

Logging API as a whole was originally done for Apache log4j. Juli is a port of main parts of that to complete the Java Logging APIs. All credits for initial idea, design, implementation, documentation belong to the log4j crew. This file was originally published by Ceki Gülcü . Please use exclusively the appropriate mailing lists for questions, remarks and contribution.

Since:
0.5
Author:
Boris Unckel

Field Summary
 
Fields inherited from class org.x4juli.global.components.AbstractFormatter
ignoresThrowable, manager, repository
 
Constructor Summary
SimpleFormatter()
          Default Constructor
 
Method Summary
 void activateOptions()
          Activate the options that were previously set with calls to option setters.
 java.lang.String doFormat(ExtendedLogRecord record)
          Writes the log statement in a format consisting of the level, followed by " - " and then the message.
 
Methods inherited from class org.x4juli.global.components.AbstractFormatter
format, format, formatMessage, getLogger, getLoggerRepository, getMessageProperties, getNonFloodingLogger, getProperty, getProperty, getProperty, ignoresThrowable, resetErrorCount, setIgnoresThrowable, setObjectStore
 
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.x4juli.global.spi.ExtendedFormatter
formatMessage, getHead, getTail
 

Constructor Detail

SimpleFormatter

public SimpleFormatter()
Default Constructor

Method Detail

doFormat

public java.lang.String doFormat(ExtendedLogRecord record)
Writes the log statement in a format consisting of the level, followed by " - " and then the message. For example,
 INFO - "A message"
 

The LogRecord.getName() parameter is ignored.

Specified by:
doFormat in class AbstractFormatter
Since:
0.5
See Also:
Formatter.format(java.util.logging.LogRecord)

activateOptions

public void activateOptions()
Description copied from interface: OptionHandler
Activate the options that were previously set with calls to option setters.

This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set.

Since:
0.5
See Also:
OptionHandler.activateOptions()


${license_html}