Module ch.qos.logback.core
Class AppenderDeclarationAnalyser
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.model.processor.ModelHandlerBase
-
- ch.qos.logback.core.model.processor.AppenderDeclarationAnalyser
-
- All Implemented Interfaces:
ContextAware
public class AppenderDeclarationAnalyser extends ModelHandlerBase
The AppenderDeclarationAnalyser class is responsible for analyzing the availability of appenders. By available, we mean whether an appender with a given name is declared somewhere in the configuration. This availability information is later used by AppenderRefModelHandler to attempt to attach only those appenders that were previously declared.
-
-
Field Summary
-
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
-
Constructor Summary
Constructors Constructor Description AppenderDeclarationAnalyser(Context context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddAppenderDeclaration(ModelInterpretationContext mic, String appenderName)static Set<String>getAppenderNameSet(ModelInterpretationContext mic)protected Class<AppenderModel>getSupportedModelClass()Subclasses should return the subclass of Model that they expect to handle.voidhandle(ModelInterpretationContext mic, Model model)static booleanisAppenderDeclared(ModelInterpretationContext mic, String appenderName)-
Methods inherited from class ch.qos.logback.core.model.processor.ModelHandlerBase
isSupportedModelType, postHandle, toString
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
-
-
-
Constructor Detail
-
AppenderDeclarationAnalyser
public AppenderDeclarationAnalyser(Context context)
-
-
Method Detail
-
getSupportedModelClass
protected Class<AppenderModel> getSupportedModelClass()
Description copied from class:ModelHandlerBaseSubclasses should return the subclass of Model that they expect to handle. The default implementation assumes that all Model classes are supported. This a very lax assumption which is usually not true.- Overrides:
getSupportedModelClassin classModelHandlerBase- Returns:
- supported model class
- See Also:
ModelHandlerBase.isSupportedModelType(Model)
-
handle
public void handle(ModelInterpretationContext mic, Model model) throws ModelHandlerException
- Specified by:
handlein classModelHandlerBase- Throws:
ModelHandlerException
-
getAppenderNameSet
public static Set<String> getAppenderNameSet(ModelInterpretationContext mic)
-
addAppenderDeclaration
public static void addAppenderDeclaration(ModelInterpretationContext mic, String appenderName)
-
isAppenderDeclared
public static boolean isAppenderDeclared(ModelInterpretationContext mic, String appenderName)
-
-