Package ch.qos.logback.core.status

## Class OnPrintStreamStatusListenerBase

- java.lang.Object
- - ch.qos.logback.core.spi.ContextAwareBase
  - - ch.qos.logback.core.status.OnPrintStreamStatusListenerBase

All Implemented Interfaces:
  `ContextAware`, `LifeCycle`, `StatusListener`

Direct Known Subclasses:
  `OnConsoleStatusListener`, `OnErrorConsoleStatusListener`

    public abstract class OnPrintStreamStatusListenerBase
    extends ContextAwareBase
    implements StatusListener, LifeCycle

Print all new incoming status messages on the on the designated PrintStream.

Author:
  Ceki Gülcü

### Field Summary

### Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

`context`

### Constructor Summary

Constructors
`OnPrintStreamStatusListenerBase()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`void` `addStatusEvent​(Status status)`
`java.lang.String` `getPrefix()`
`protected abstract java.io.PrintStream` `getPrintStream()` The PrintStream used by derived classes
`long` `getRetrospective()`
`boolean` `isStarted()`
`void` `setPrefix​(java.lang.String prefix)`
`void` `setRetrospective​(long retrospective)`
`void` `start()` Invoking the start method can cause the instance to print status messages created less than value of retrospectiveThresold.
`void` `stop()`

### Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

`addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### OnPrintStreamStatusListenerBase

    public OnPrintStreamStatusListenerBase()

### Method Detail

#### getPrintStream

    protected abstract java.io.PrintStream getPrintStream()

The PrintStream used by derived classes

Returns:

#### addStatusEvent

    public void addStatusEvent​(Status status)

Specified by:
  `addStatusEvent` in interface `StatusListener`

#### start

    public void start()

Invoking the start method can cause the instance to print status messages created less than value of retrospectiveThresold.

Specified by:
  `start` in interface `LifeCycle`

#### getPrefix

    public java.lang.String getPrefix()

#### setPrefix

    public void setPrefix​(java.lang.String prefix)

#### setRetrospective

    public void setRetrospective​(long retrospective)

#### getRetrospective

    public long getRetrospective()

#### stop

    public void stop()

Specified by:
  `stop` in interface `LifeCycle`

#### isStarted

    public boolean isStarted()

Specified by:
  `isStarted` in interface `LifeCycle`