Module ch.qos.logback.classic
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(ch.qos.logback.core.model.processor.ModelInterpretationContext, ch.qos.logback.core.model.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 ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<ConfigurationModel> voidhandle(ModelInterpretationContext mic, Model model) voidpostHandle(ModelInterpretationContext mic, Model model) Methods inherited from class ch.qos.logback.core.model.processor.ModelHandlerBase
isSupportedModelType, toStringMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Constructor Details
-
CallerContradictionWarnAnalyser
-
-
Method Details
-
getSupportedModelClass
- Overrides:
getSupportedModelClassin classModelHandlerBase
-
handle
- Specified by:
handlein classModelHandlerBase- Throws:
ModelHandlerException
-
postHandle
- Overrides:
postHandlein classModelHandlerBase- Throws:
ModelHandlerException
-