- 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,OnFileStatusListener
public abstract class OnPrintStreamStatusListenerBase extends ContextAwareBase implements StatusListener, LifeCycle
Print all new incoming status messages on the designated PrintStream.- Author:
- Ceki Gülcü
-
-
Field Summary
-
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
-
Constructor Summary
Constructors Constructor Description OnPrintStreamStatusListenerBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddStatusEvent(Status status)StringgetPrefix()protected abstract PrintStreamgetPrintStream()The PrintStream used by derived classeslonggetRetrospective()booleanisResetResistant()Reset resistant status listeners return true here.booleanisStarted()voidsetPrefix(String prefix)voidsetResetResistant(boolean resetResistant)voidsetRetrospective(long retrospective)voidstart()Invoking the start method can cause the instance to print status messages created less than value of retrospectiveThresold.voidstop()-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
-
-
-
Constructor Detail
-
OnPrintStreamStatusListenerBase
public OnPrintStreamStatusListenerBase()
-
-
Method Detail
-
getPrintStream
protected abstract PrintStream getPrintStream()
The PrintStream used by derived classes- Returns:
-
addStatusEvent
public void addStatusEvent(Status status)
- Specified by:
addStatusEventin interfaceStatusListener
-
start
public void start()
Invoking the start method can cause the instance to print status messages created less than value of retrospectiveThresold.
-
setRetrospective
public void setRetrospective(long retrospective)
-
getRetrospective
public long getRetrospective()
-
isResetResistant
public boolean isResetResistant()
Description copied from interface:StatusListenerReset resistant status listeners return true here. Default is false.- Specified by:
isResetResistantin interfaceStatusListener- Returns:
- whether this listener is reset resistant
-
setResetResistant
public void setResetResistant(boolean resetResistant)
-
-