SLING-1659 - adding MDC setup to HttpTestBase and logback-test.xml (based heavily on the one from jackrabbit-core)

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@985980 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml
new file mode 100644
index 0000000..51c11bc
--- /dev/null
+++ b/src/test/resources/logback-test.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+  -->
+<configuration>
+
+    <appender name="file" class="ch.qos.logback.core.FileAppender">
+        <file>target/sling-tests.log</file>
+        <encoder>
+            <pattern>%date{HH:mm:ss.SSS} %-5level %-40([%thread] %F:%L) %msg%n</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="sift" class="ch.qos.logback.classic.sift.SiftingAppender">
+        <discriminator>
+            <Key>testclass</Key>
+            <DefaultValue>junit</DefaultValue>
+        </discriminator>
+        <sift>
+            <appender name="FILE-${testname}" class="ch.qos.logback.core.FileAppender">
+                <File>target/surefire-reports/${testclass}.log</File>
+                <layout class="ch.qos.logback.classic.PatternLayout">
+                    <Pattern>%date{HH:mm:ss.SSS} %-5level %-40([%thread] %F:%L) %msg%n</Pattern>
+                </layout>
+            </appender>
+        </sift>
+    </appender>
+
+    <logger name="org.apache.sling.launchpad" level="DEBUG" />
+
+    <root level="INFO">
+        <appender-ref ref="file" />
+        <appender-ref ref="sift" />
+    </root>
+
+</configuration>
\ No newline at end of file