Class 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: