public class

LF5Appender

extends AppenderSkeleton
java.lang.Object
   ↳ org.apache.log4j.AppenderSkeleton
     ↳ org.apache.log4j.lf5.LF5Appender

Class Overview

LF5Appender logs events to a swing based logging console. The swing console supports turning categories on and off, multiple detail level views, as well as full text searching and many other capabilties.

Summary

Fields
protected static LogBrokerMonitor _defaultLogMonitor
protected static AppenderFinalizer _finalizer
protected LogBrokerMonitor _logMonitor
[Expand]
Inherited Fields
From class org.apache.log4j.AppenderSkeleton
Public Constructors
LF5Appender()
Constructs a LF5Appender using the default instance of the LogBrokerMonitor.
LF5Appender(LogBrokerMonitor monitor)
Constructs a LF5Appender using an instance of a LogBrokerMonitor supplied by the user.
Public Methods
void append(LoggingEvent event)
Appends a LoggingEvent record to the LF5Appender.
void close()
This method is an empty implementation of the close() method inherited from the org.apache.log4j.Appender interface.
boolean equals(LF5Appender compareTo)
The equals method compares two LF5Appenders and determines whether they are equal.
LogBrokerMonitor getLogBrokerMonitor()
static void main(String[] args)
boolean requiresLayout()
Returns a value that indicates whether this appender requires a Layout.
void setCallSystemExitOnClose(boolean callSystemExitOnClose)
This method is used to set the property that controls whether the LogBrokerMonitor is hidden or closed when a user exits the monitor.
void setMaxNumberOfRecords(int maxNumberOfRecords)
Protected Methods
synchronized static LogBrokerMonitor getDefaultInstance()
static int getDefaultMonitorHeight()
static int getDefaultMonitorWidth()
static int getScreenHeight()
static int getScreenWidth()
[Expand]
Inherited Methods
From class org.apache.log4j.AppenderSkeleton
From class java.lang.Object
From interface org.apache.log4j.Appender
From interface org.apache.log4j.spi.OptionHandler

Fields

protected static LogBrokerMonitor _defaultLogMonitor

protected static AppenderFinalizer _finalizer

protected LogBrokerMonitor _logMonitor

Public Constructors

public LF5Appender ()

Constructs a LF5Appender using the default instance of the LogBrokerMonitor. This constructor should always be preferred over the LF5Appender(LogBrokerMonitor monitor) constructor, unless you need to spawn additional log monitoring windows.

public LF5Appender (LogBrokerMonitor monitor)

Constructs a LF5Appender using an instance of a LogBrokerMonitor supplied by the user. This constructor should only be used when you need to spawn additional log monitoring windows.

Parameters
monitor An instance of a LogBrokerMonitor created by the user.

Public Methods

public void append (LoggingEvent event)

Appends a LoggingEvent record to the LF5Appender.

Parameters
event The LoggingEvent to be appended.

public void close ()

This method is an empty implementation of the close() method inherited from the org.apache.log4j.Appender interface.

public boolean equals (LF5Appender compareTo)

The equals method compares two LF5Appenders and determines whether they are equal. Two Appenders will be considered equal if, and only if, they both contain references to the same LogBrokerMonitor.

Parameters
compareTo A boolean value indicating whether the two LF5Appenders are equal.

public LogBrokerMonitor getLogBrokerMonitor ()

public static void main (String[] args)

public boolean requiresLayout ()

Returns a value that indicates whether this appender requires a Layout. This method always returns false. No layout is required for the LF5Appender.

public void setCallSystemExitOnClose (boolean callSystemExitOnClose)

This method is used to set the property that controls whether the LogBrokerMonitor is hidden or closed when a user exits the monitor. By default, the LogBrokerMonitor will hide itself when the log window is exited, and the swing thread will continue to run in the background. If this property is set to true, the LogBrokerMonitor will call System.exit(0) and will shut down swing thread and the virtual machine.

Parameters
callSystemExitOnClose A boolean value indicating whether to call System.exit(0) when closing the log window.

public void setMaxNumberOfRecords (int maxNumberOfRecords)

Protected Methods

protected static synchronized LogBrokerMonitor getDefaultInstance ()

Returns
  • The default instance of the LogBrokerMonitor.

protected static int getDefaultMonitorHeight ()

protected static int getDefaultMonitorWidth ()

protected static int getScreenHeight ()

Returns
  • the screen height from Toolkit.getScreenSize() if possible, otherwise returns 600
See Also
  • java.awt.Toolkit

protected static int getScreenWidth ()

Returns
  • the screen width from Toolkit.getScreenSize() if possible, otherwise returns 800
See Also
  • java.awt.Toolkit