commit bb3317c074f8be4ed1886709ed08c5cc2a67b7fd
Author: Cherian Mathew <c.mathew@bgbm.org>
Date:   Fri Jun 26 15:11:25 2015 +0200

    Add log4j extras to apply expression filters

diff --git a/eu.etaxonomy.taxeditor.cdmlib/.classpath b/eu.etaxonomy.taxeditor.cdmlib/.classpath
index b0f53bf55..d861dae1a 100644
--- a/eu.etaxonomy.taxeditor.cdmlib/.classpath
+++ b/eu.etaxonomy.taxeditor.cdmlib/.classpath
@@ -1,13 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.6.3-SNAPSHOT.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.6.3-SNAPSHOT.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.6.3-SNAPSHOT.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.6.3-SNAPSHOT.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.6.3-SNAPSHOT.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.6.3-SNAPSHOT.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.6.3-SNAPSHOT.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.6.3-SNAPSHOT.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
@@ -197,5 +189,14 @@
 	<classpathentry exported="true" kind="lib" path="lib/xmlbeans-2.3.0.jar"/>
 	<classpathentry exported="true" kind="lib" path="lib/poi-ooxml-schemas-3.10-FINAL.jar"/>
 	<classpathentry exported="true" kind="lib" path="lib/swagger-annotations-1.3.5.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.6.3-SNAPSHOT.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.6.3-SNAPSHOT.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.6.3-SNAPSHOT.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.6.3-SNAPSHOT.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.6.3-SNAPSHOT.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.6.3-SNAPSHOT.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.6.3-SNAPSHOT.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.6.3-SNAPSHOT.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/apache-log4j-extras-1.2.17.jar"/>
 	<classpathentry kind="output" path="target/classes"/>
 </classpath>
diff --git a/eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF b/eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
index 09147a895..f20a9a636 100644
--- a/eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
+++ b/eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
@@ -662,5 +662,6 @@ Bundle-ClassPath: .,
  lib/cdmlib-persistence-3.6.3-SNAPSHOT.jar,
  lib/cdmlib-print-3.6.3-SNAPSHOT.jar,
  lib/cdmlib-remote-3.6.3-SNAPSHOT.jar,
- lib/cdmlib-services-3.6.3-SNAPSHOT.jar
+ lib/cdmlib-services-3.6.3-SNAPSHOT.jar,
+ lib/apache-log4j-extras-1.2.17.jar
 Import-Package: eu.etaxonomy.cdm.api.application
diff --git a/eu.etaxonomy.taxeditor.cdmlib/build.properties b/eu.etaxonomy.taxeditor.cdmlib/build.properties
index 85f6c75fa..882048b6d 100644
--- a/eu.etaxonomy.taxeditor.cdmlib/build.properties
+++ b/eu.etaxonomy.taxeditor.cdmlib/build.properties
@@ -192,7 +192,8 @@ bin.includes = META-INF/,\
                lib/cdmlib-persistence-3.6.3-SNAPSHOT.jar,\
                lib/cdmlib-print-3.6.3-SNAPSHOT.jar,\
                lib/cdmlib-remote-3.6.3-SNAPSHOT.jar,\
-               lib/cdmlib-services-3.6.3-SNAPSHOT.jar
+               lib/cdmlib-services-3.6.3-SNAPSHOT.jar,\
+               lib/apache-log4j-extras-1.2.17.jar
 
 jars.compile.order = .
 output.. = bin/
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/apache-log4j-extras-1.2.17.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/apache-log4j-extras-1.2.17.jar
new file mode 100644
index 000000000..b08d8d56e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/apache-log4j-extras-1.2.17.jar differ
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/log4j.properties b/eu.etaxonomy.taxeditor.test/src/test/resources/log4j.properties
deleted file mode 100644
index ff6e71c72..000000000
--- a/eu.etaxonomy.taxeditor.test/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-### ************ APPENDER ***********************************###
-
-### direct log messages to stdout ###
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-
-### ************* LOG LEVELS *********************************###
-
-### set log levels - for more verbose logging change 'info' to 'debug' ###
-### levels: error, warn, debug, info
-log4j.rootLogger=WARN, stdout
-
-### set directory-specific levels below
-#log4j.logger.eu.etaxonomy.taxeditor = INFO
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.test/src/test/resources/log4j.xml b/eu.etaxonomy.taxeditor.test/src/test/resources/log4j.xml
new file mode 100644
index 000000000..03e75567c
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.test/src/test/resources/log4j.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> 
+        <param name="Target" value="System.out"/>
+        <layout class="org.apache.log4j.PatternLayout"> 
+            <param name="ConversionPattern" value="%d %p [%c] - %m%n"/>
+        </layout>
+        <filter class="org.apache.log4j.filter.ExpressionFilter">
+            <param name="expression" value="msg like  '.*has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client.*'" />
+            <param name="acceptOnMatch" value="false"/>
+        </filter>            
+    </appender>
+    <root>
+        <priority value ="WARN" />
+        <appender-ref ref="CONSOLE"/>
+    </root>
+</log4j:configuration>
\ No newline at end of file
