ch.qos.logback.core.spi
Class ContextAwareBase
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
- All Implemented Interfaces:
- ContextAware
- Direct Known Subclasses:
- Action, AppenderBase, Compressor, ConfigurationWatchList, ConnectionSourceBase, ContextUtil, DBUtil, DefaultArchiveRemover, EncoderBase, EventEvaluatorBase, FileNamePattern, Filter, GenericConfigurator, InterpretationContext, LayoutBase, Matcher, OnConsoleStatusListener, Parser, PropertyDefinerBase, PropertyEvalScriptBuilder, PropertySetter, RenameUtil, RollingPolicyBase, SimpleRuleStore, TimeBasedFileNamingAndTriggeringPolicyBase, TriggeringPolicyBase, UnsynchronizedAppenderBase
public class ContextAwareBase
- extends Object
- implements ContextAware
A helper class that implements ContextAware methods. A class can implement
the ContextAware interface by deriving from this class.
- Author:
- Ceki Gülcü
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
context
protected Context context
ContextAwareBase
public ContextAwareBase()
ContextAwareBase
public ContextAwareBase(Object declaredOrigin)
setContext
public void setContext(Context context)
- Specified by:
setContext
in interface ContextAware
getContext
public Context getContext()
- Specified by:
getContext
in interface ContextAware
getStatusManager
public StatusManager getStatusManager()
getDeclaredOrigin
protected Object getDeclaredOrigin()
- The declared origin of status messages. By default 'this'. Derived classes may override this
method to declare other origin.
- Returns:
- the declared origin, by default 'this'
addStatus
public void addStatus(Status status)
- Specified by:
addStatus
in interface ContextAware
addInfo
public void addInfo(String msg)
- Specified by:
addInfo
in interface ContextAware
addInfo
public void addInfo(String msg,
Throwable ex)
- Specified by:
addInfo
in interface ContextAware
addWarn
public void addWarn(String msg)
- Specified by:
addWarn
in interface ContextAware
addWarn
public void addWarn(String msg,
Throwable ex)
- Specified by:
addWarn
in interface ContextAware
addError
public void addError(String msg)
- Specified by:
addError
in interface ContextAware
addError
public void addError(String msg,
Throwable ex)
- Specified by:
addError
in interface ContextAware
Copyright © 2005-2012 QOS.ch. All Rights Reserved.