]> source.dussan.org Git - poi.git/commitdiff
added commons-logging to integration test to make profiling easier - just match the...
authorAndreas Beeker <kiwiwings@apache.org>
Mon, 16 May 2016 09:49:17 +0000 (09:49 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Mon, 16 May 2016 09:49:17 +0000 (09:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1744001 13f79535-47bb-0310-9956-ffa450edef68

build.xml
src/integrationtest/commons-logging.properties [new file with mode: 0644]
src/integrationtest/log4j.properties [new file with mode: 0644]

index 1d9b91fcd91616acc2588fbcaabc5838a53df7d8..8f4bb29ce492173f8bc70387824a702e30a4d9c6 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -90,7 +90,10 @@ under the License.
     </condition>
     <!-- Fix for strange woodstox references in gump build -->
     <property name="javax.xml.stream.XMLInputFactory" value="com.sun.xml.internal.stream.XMLInputFactoryImpl"/>
+       <!-- need to override POILogger property before commons logging works -->
+    <property name="org.apache.commons.logging.Log" value="org.apache.commons.logging.impl.Log4JLogger"/>
 
+       
     <!-- Main: -->
     <property name="main.resource1.dir" value="src/resources/main"/>
     <property name="main.src" location="src/java"/>
@@ -282,6 +285,7 @@ under the License.
         <propertyref name="user.language"/>
         <propertyref name="user.country"/>
         <propertyref name="javax.xml.stream.XMLInputFactory"/>
+       <propertyref name="org.apache.commons.logging.Log"/>
     </propertyset>
 
     <path id="main.classpath">
@@ -341,6 +345,7 @@ under the License.
     </path>
 
     <path id="test.integration.classpath">
+        <pathelement location="${integration.src.test}"/>
         <path refid="scratchpad.classpath"/>
         <path refid="ooxml.classpath"/>
         <pathelement location="${main.output.test.dir}"/>
@@ -1453,6 +1458,8 @@ under the License.
 
     <target name="test-integration" depends="compile-integration,-test-integration-check,jacocotask"
             unless="integration.test.notRequired" xmlns:jacoco="antlib:org.jacoco.ant">
+       <propertyreset name="org.apache.poi.util.POILogger" value="org.apache.poi.util.CommonsLogger"/>
+       <delete dir="build" includes="test-integration.log*"/>
         <jacoco:coverage enabled="${coverage.enabled}" excludes="${coverage.excludes}" destfile="build/jacoco-integration.exec">
             <junit printsummary="yes" fork="yes" forkmode="once" haltonfailure="${halt.on.test.failure}"
                    failureproperty="integration.test.failed" showoutput="true">
@@ -2205,7 +2212,7 @@ under the License.
             <local name="lastUpdated"/>
             <tstamp>
                 <format property="lastUpdated" pattern="yyyyMMddHHmmss" timezone="UTC"/>
-            </tstamp>            
+            </tstamp>
 
             <local name="metadir"/>
             <property name="metadir" location="${repo}/org/apache/poi/@{artifactId}"/>
diff --git a/src/integrationtest/commons-logging.properties b/src/integrationtest/commons-logging.properties
new file mode 100644 (file)
index 0000000..fdf106f
--- /dev/null
@@ -0,0 +1 @@
+log4j.configuration=log4j.properties
\ No newline at end of file
diff --git a/src/integrationtest/log4j.properties b/src/integrationtest/log4j.properties
new file mode 100644 (file)
index 0000000..971ba85
--- /dev/null
@@ -0,0 +1,25 @@
+log4j.rootLogger=info, R\r
+\r
+log4j.appender.R=org.apache.log4j.RollingFileAppender\r
+log4j.appender.R.File=build/test-integration.log\r
+\r
+log4j.appender.R.MaxFileSize=1000KB\r
+# Keep one backup file\r
+log4j.appender.R.MaxBackupIndex=5\r
+\r
+log4j.appender.R.layout=org.apache.log4j.PatternLayout\r
+log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n\r
+\r
+log4j.logger.org.apache.poi.poifs.nio.FileBackedDataSource=ERROR\r
+log4j.logger.org.apache.poi.hdgf.chunks.Chunk=FATAL\r
+log4j.logger.org.apache.poi.hpsf.CodePageString=ERROR\r
+log4j.logger.org.apache.poi.hdgf.chunks.ChunkFactory=ERROR\r
+log4j.logger.org.apache.poi.hslf.model.textproperties.BitMaskTextProp=ERROR\r
+log4j.logger.org.apache.poi.util.JvmBugs=ERROR\r
+log4j.logger.org.apache.poi.hslf.usermodel.HSLFTextParagraph=ERROR\r
+log4j.logger.org.apache.poi.openxml4j.opc.ZipPackage=ERROR\r
+log4j.logger.org.apache.poi.POIDocument=WARN\r
+log4j.logger.org.apache.poi.openxml4j.opc.OPCPackage=ERROR\r
+log4j.logger.org.apache.poi.xssf.usermodel.XSSFWorkbook=ERROR\r
+log4j.logger.org.apache.poi.hslf.usermodel.HSLFGroupShape=WARN\r
+log4j.logger.org.apache.poi.hslf.record.Record=ERROR
\ No newline at end of file