Log4j 1.3alpha-7

org.apache.log4j.varia
Class ExternallyRolledFileAppender

java.lang.Object
  extended byorg.apache.log4j.RollingFileAppender
      extended byorg.apache.log4j.varia.ExternallyRolledFileAppender
All Implemented Interfaces:
Appender, Component, OptionHandler

Deprecated. version 1.3

public final class ExternallyRolledFileAppender
extends RollingFileAppender

This appender listens on a socket on the port specified by the Port property for a "RollOver" message. When such a message is received, the underlying log file is rolled over and an acknowledgment message is sent back to the process initiating the roll over.

This method of triggering roll over has the advantage of being operating system independent, fast and reliable.

A simple application Roller is provided to initiate the roll over.

Note that the initiator is not authenticated. Anyone can trigger a rollover. In production environments, it is recommended that you add some form of protection to prevent undesired rollovers.

Since:
version 0.9.0
Author:
Ceki Gülcü, Curt Arnold

Field Summary
static String OK
          Deprecated. The string constant sent to acknowledge a roll over.
static String ROLL_OVER
          Deprecated. The string constant sent to initiate a roll over.
 
Constructor Summary
ExternallyRolledFileAppender()
          Deprecated. The default constructor does nothing but calls its super-class constructor.
 
Method Summary
 void activateOptions()
          Deprecated. Start listening on the port specified by a preceding call to setPort(int).
 void close()
          Deprecated. Close this appender instance.
 int getPort()
          Deprecated. Gets the port monitored for rollover requests.
 void setPort(int port)
          Deprecated. Sets the port monitored for rollover requests.
 
Methods inherited from class org.apache.log4j.RollingFileAppender
addFilter, clearFilters, doAppend, getAppend, getBufferedIO, getBufferSize, getErrorHandler, getFile, getFilter, getLayout, getMaxBackupIndex, getMaximumFileSize, getName, isActive, isClosed, rollOver, setAppend, setBufferedIO, setBufferSize, setErrorHandler, setFile, setLayout, setLoggerRepository, setMaxBackupIndex, setMaxFileSize, setMaximumFileSize, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLL_OVER

public static final String ROLL_OVER
Deprecated. 
The string constant sent to initiate a roll over. Current value of this string constant is RollOver.

See Also:
Constant Field Values

OK

public static final String OK
Deprecated. 
The string constant sent to acknowledge a roll over. Current value of this string constant is OK.

See Also:
Constant Field Values
Constructor Detail

ExternallyRolledFileAppender

public ExternallyRolledFileAppender()
Deprecated. 
The default constructor does nothing but calls its super-class constructor.

Method Detail

setPort

public void setPort(int port)
Deprecated. 
Sets the port monitored for rollover requests.


getPort

public int getPort()
Deprecated. 
Gets the port monitored for rollover requests. A value of 0 indicates no monitoring.


activateOptions

public void activateOptions()
Deprecated. 
Start listening on the port specified by a preceding call to setPort(int).

Specified by:
activateOptions in interface OptionHandler
Overrides:
activateOptions in class RollingFileAppender

close

public void close()
Deprecated. 
Close this appender instance. The underlying stream or writer is also closed.

Closed appenders cannot be reused.

Specified by:
close in interface Appender
Overrides:
close in class RollingFileAppender

Log4j 1.3alpha-7

Copyright 2000-2005 Apache Software Foundation.