com.jaxfront.swing.ui.editor
Class ConsolAppender

java.lang.Object
  extended by org.apache.log4j.AppenderSkeleton
      extended by com.jaxfront.swing.ui.editor.ConsolAppender
All Implemented Interfaces:
org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

public class ConsolAppender
extends org.apache.log4j.AppenderSkeleton

The ConsoleAppender appends log events to the jaxfront Console.

Version:
1.60
See Also:
com.jaxfront.core.ui.editor.Console

Constructor Summary
ConsolAppender(Console console)
          ConsolAppender constructor.
ConsolAppender(Console console, org.apache.log4j.Layout layout)
          ConsolAppender constructor.
 
Method Summary
 void close()
          Release any resources allocated within the appender such as file handles, network connections, etc.
 boolean requiresLayout()
          Configurators call this method to determine if the appender requires a layout.
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
activateOptions, addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsolAppender

public ConsolAppender(Console console)
ConsolAppender constructor.

Parameters:
console - com.jaxfront.core.ui.editor.Console

ConsolAppender

public ConsolAppender(Console console,
                      org.apache.log4j.Layout layout)
ConsolAppender constructor.

Parameters:
console - com.jaxfront.core.ui.editor.Console
layout - org.apache.log4j.Layout
Method Detail

close

public void close()
Release any resources allocated within the appender such as file handles, network connections, etc.

It is a programming error to append to a closed appender.


requiresLayout

public boolean requiresLayout()
Configurators call this method to determine if the appender requires a layout. If this method returns true, meaning that layout is required, then the configurator will configure an layout using the configuration information at its disposal. If this method returns false, meaning that a layout is not required, then layout configuration will be skipped even if there is available layout configuration information at the disposal of the configurator..

In the rather exceptional case, where the appender implementation admits a layout but can also work without it, then the appender should return true.