Issue Type: Bug Bug
Affects Versions: 1.1.2
Assignee: Logback dev list
Components: logback-classic, logback-core
Created: 12/Nov/14 7:16 PM
Description:

By configuring an application with both an AsyncAppender and a ConsoleAppender, the includeCallerData property of AsyncAppender will always be true, no mather if it's omitted or explicitly set to false.

This problem came to my attention after implementing the AsyncAppender in production. I had forgotten to set includeCallerData to true and hence the application was logging question marks . When I implemented the AsyncAppender in a testing environment along with the ConsoleAppender before setting includeCallerData to true, the question marks were replaced correctly.

Example configuration:

 
<?xml version="1.0" encoding="UTF-8"?>

<configuration scan="true">

	<appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
		<encoder>
			<pattern>%d %-4p [%X{uow}-%X{requestId}] [%t] [%X{group}] (%F:%L\) : %msg%n</pattern>
		</encoder>
	</appender>

	<appender name="FILE"
		class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>/tmp/app.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<!-- daily rollover -->
			<fileNamePattern>notifier.%d{yyyy-MM-dd}.log</fileNamePattern>

			<!-- keep 30 days' worth of history -->
			<maxHistory>10</maxHistory>
		</rollingPolicy>
		<encoder>
			<pattern>%d %-4p [%X{uow}-%X{requestId}] [%t] [%X{group}] (%F:%L\) : %msg%n</pattern>
		</encoder>
	</appender>

	<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
		<appender-ref ref="FILE" />
		<includeCallerData>false</includeCallerData>
	</appender>

	<root level="INFO">
		<appender-ref ref="Console" />
		<appender-ref ref="ASYNC" />
	</root>
</configuration>
Project: logback
Priority: Minor Minor
Reporter: Nicolás Hertzulis
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira