Overview | Package | Class | Use | Tree | Deprecated | Index | Help

Log4j 1.2.8
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.log4j.net
Class TelnetAppender

    java.lang.Object
      |
      +--org.apache.log4j.AppenderSkeleton
            |
            +--org.apache.log4j.net.TelnetAppender

All Implemented Interfaces:
  Appender, OptionHandler

public class TelnetAppender
extends AppenderSkeleton

The TelnetAppender is a log4j appender that specializes in writing to a read-only socket. The output is provided in a telnet-friendly way so that a log can be monitored over TCP/IP. Clients using telnet connect to the socket and receive log data. This is handy for remote monitoring, especially when monitoring a servlet.

Here is a list of the available configuration options:

Name | Requirement | Description | Sample Value
--- | --- | --- | ---
Port | optional | This parameter determines the port to use for announcing log events. The default port is 23 (telnet). | 5875

Author:
  Jay Funnell

Inner Class Summary
`protected class` | `TelnetAppender.SocketHandler` The SocketHandler class is used to accept connections from clients.

Fields inherited from class org.apache.log4j.AppenderSkeleton
`closed, errorHandler, headFilter, layout, name, tailFilter, threshold`

Constructor Summary
`TelnetAppender()`

Method Summary
`void` | `activateOptions()` all of the options have been set, create the socket handler and wait for connections.
`protected void` | `append(LoggingEvent event)` Handles a log event.
`void` | `close()` shuts down the appender.
`int` | `getPort()`
`boolean` | `requiresLayout()` This appender requires a layout to format the text to the attached client(s).
`void` | `setPort(int port)`

Methods inherited from class org.apache.log4j.AppenderSkeleton
`addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TelnetAppender

    public TelnetAppender()

Method Detail

### requiresLayout

    public boolean requiresLayout()

  This appender requires a layout to format the text to the attached client(s).

### activateOptions

    public void activateOptions()

  all of the options have been set, create the socket handler and wait for connections.
  Overrides:
    `activateOptions` in class `AppenderSkeleton`

### getPort

    public int getPort()

### setPort

    public void setPort(int port)

### close

    public void close()

  shuts down the appender.

### append

    protected void append(LoggingEvent event)

  Handles a log event. For this appender, that means writing the message to each connected client.
  Overrides:
    `append` in class `AppenderSkeleton`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

Log4j 1.2.8
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2000-2002 Apache Software Foundation.