Author: stefanegli
Date: Fri Feb 28 17:22:53 2014
New Revision: 1573005

URL: http://svn.apache.org/r1573005
Log:
no-jira : using log4j to filter away the enormous amount of TransientRepository 
INFO log output

Added:
    sling/trunk/bundles/extensions/discovery/impl/src/test/resources/
    
sling/trunk/bundles/extensions/discovery/impl/src/test/resources/log4j.properties
Modified:
    sling/trunk/bundles/extensions/discovery/impl/pom.xml

Modified: sling/trunk/bundles/extensions/discovery/impl/pom.xml
URL: 
http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/impl/pom.xml?rev=1573005&r1=1573004&r2=1573005&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/discovery/impl/pom.xml (original)
+++ sling/trunk/bundles/extensions/discovery/impl/pom.xml Fri Feb 28 17:22:53 
2014
@@ -198,11 +198,6 @@
             <artifactId>jmock-junit4</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-simple</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-all</artifactId>
             <version>1.9.5</version>
@@ -213,7 +208,29 @@
                <artifactId>org.apache.sling.commons.testing</artifactId>
                <version>2.0.14</version>
                <scope>test</scope>
-        </dependency>
+            <exclusions>
+                <!-- slf4j simple implementation logs INFO + higher to stdout 
(we don't want that behaviour) -->
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-simple</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        
+        <!-- using log4j under slf4j to allow fine-grained logging config (see 
src/test/resources/log4j.properties) -->
+           <dependency>
+                       <groupId>org.slf4j</groupId>
+                       <artifactId>slf4j-log4j12</artifactId>
+                       <version>1.5.2</version>
+                       <scope>test</scope>
+           </dependency>
+           <dependency>
+                       <groupId>log4j</groupId>
+                       <artifactId>log4j</artifactId>
+                       <version>1.2.13</version>
+                       <scope>test</scope>
+           </dependency>
+
         <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.commons.threads</artifactId>

Added: 
sling/trunk/bundles/extensions/discovery/impl/src/test/resources/log4j.properties
URL: 
http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/impl/src/test/resources/log4j.properties?rev=1573005&view=auto
==============================================================================
--- 
sling/trunk/bundles/extensions/discovery/impl/src/test/resources/log4j.properties
 (added)
+++ 
sling/trunk/bundles/extensions/discovery/impl/src/test/resources/log4j.properties
 Fri Feb 28 17:22:53 2014
@@ -0,0 +1,25 @@
+# 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.
+
+log4j.rootLogger=INFO, stdout
+
+log4j.logger.org.apache.jackrabbit.core.TransientRepository=WARN
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+#log4j.appender.stdout.layout.ConversionPattern=%d{dd.MM.yyyy HH:mm:ss} *%-5p* 
[%t] %c{1}: %m (%F, line %L)\n
+log4j.appender.stdout.layout.ConversionPattern=%d{dd.MM.yyyy HH:mm:ss} *%-5p* 
[%t] %c{1}: %m\n


Reply via email to