Class CallerContradictionWarnAnalyser
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.model.processor.ModelHandlerBase
ch.qos.logback.classic.model.processor.CallerContradictionWarnAnalyser
- All Implemented Interfaces:
ContextAware
Dependency-analysis handler for
ConfigurationModel that warns when a
configuration contains contradictory caller-data instructions, for example an
AsyncAppender, SocketAppender or SMTPAppender with
includeCallerData=false (the default) alongside an appender (or
SMTP layout) whose pattern uses a caller-data converter (%C,
%M, %L, %F, %l, %class,
%method, %line, %file, %caller).
All work is done in postHandle(ModelInterpretationContext, Model) so that it runs after every child
AppenderModel has been visited by
CallerContradictionAnalyser, regardless of declaration order.
Analysis is skipped when the variable
"logback.skipCallerContradictionAnalysis"
is set to true.
- Since:
- 1.6.2
- See Also:
-
Field Summary
Fields inherited from class ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<ConfigurationModel> Subclasses should return the subclass of Model that they expect to handle.voidhandle(ModelInterpretationContext mic, Model model) voidpostHandle(ModelInterpretationContext mic, Model model) Methods inherited from class ModelHandlerBase
isSupportedModelType, toStringMethods inherited from class ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Constructor Details
-
CallerContradictionWarnAnalyser
-
-
Method Details
-
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:
-
handle
- Specified by:
handlein classModelHandlerBase- Throws:
ModelHandlerException
-
postHandle
- Overrides:
postHandlein classModelHandlerBase- Throws:
ModelHandlerException
-