Module ch.qos.logback.classic
Class CallerContradictionAnalyser
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.model.processor.ModelHandlerBase
ch.qos.logback.classic.model.processor.CallerContradictionAnalyser
- All Implemented Interfaces:
ContextAware
Dependency-analysis pass over every
AppenderModel: records which
appenders suppress caller data (AsyncAppender, SocketAppender
or SMTPAppender with includeCallerData=false / default) and
which appenders need it (pattern contains a caller-data converter).
SMTPAppender is special: it both preprocesses caller data
(includeCallerData) and formats events via its own layout. Those two
contributions are recorded as separate map entries under
name + INCLUDE_CALLER_DATA_NAME_SUFFIX and
name + LAYOUT_NAME_SUFFIX so that contradictions within a
single SMTP appender (e.g. includeCallerData=false but layout uses
%C) can be detected.
Analysis is skipped when the variable
"logback.skipCallerContradictionAnalysis" is set to
true (context property, local property, system property or
environment variable).
The contradiction check is performed by CallerContradictionWarnAnalyser
in its postHandle() on the enclosing ConfigurationModel, after
all appender models have been visited.
- Since:
- 1.6.2
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringWhen this property/variable istrue, caller-contradiction analysis is not performed.Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<AppenderModel> voidhandle(ModelInterpretationContext mic, Model model) Methods inherited from class ch.qos.logback.core.model.processor.ModelHandlerBase
isSupportedModelType, postHandle, toStringMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Field Details
-
SKIP_CALLER_CONTRADICTION_ANALYSIS_PROPERTY
When this property/variable istrue, caller-contradiction analysis is not performed.- See Also:
-
-
Constructor Details
-
CallerContradictionAnalyser
-
-
Method Details
-
getSupportedModelClass
- Overrides:
getSupportedModelClassin classModelHandlerBase
-
handle
- Specified by:
handlein classModelHandlerBase- Throws:
ModelHandlerException
-