On Tue, 2016-07-26 at 16:24 +0100, Ian Boston wrote: > Hi, > On the command line that doesnt appear to do anything. > > cd bundles/commons/classloader > mvn -q > -Dmaven.surefire.debug="-Dorg.slf4j.simpleLogger.defaultLogLevel=warn > -Dorg.apache.sling.commons.log.level=WARN > -Dorg.ops4j.pax.logging.DefaultServiceLog.level=ERROR" clean install
No, it probably needs to be set in the Java code, as the pax-exam container is usually forked. Perhaps we can add a utility method which forwards a well-known system property to pax-exam in the new pax-exam support bundle. Robert > > ... > > > [main] INFO org.ops4j.exec.DefaultJavaRunner - Platform has been > shutdown. > [main] INFO org.ops4j.pax.exam.spi.reactors.ReactorManager - suite > finished > > Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.947 > sec - > in org.apache.sling.commons.classloader.it.DynamicClassLoaderIT > > even with > > ./mvnw -q > -Dmaven.surefire.debug="-Dorg.slf4j.simpleLogger.defaultLogLevel=warn > -Dorg.apache.sling.commons.log.level=WARN" clean install > -DHttpTestBase.readyTimeoutSeconds=300 -PintegrationTests 2>&1 > | grep -v > DEBUG | grep -v INFO | grep -v REGISTER > > > I still get > 30K lines of logs, but the build is getting further > through. I > may have to get a lot more aggressive at filtering out the junk. > > > Thanks for the pointer. > > Best Regards > > Ian > > > > On 26 July 2016 at 16:08, Robert Munteanu <romb...@apache.org> wrote: > > > Hi Ian, > > > > On Tue, 2016-07-26 at 15:58 +0100, Ian Boston wrote: > > > Hi, > > > I am trying to reduce the volume of logging output that a Sling > > > build > > > produces so that we can build pull requests using Travis. Travis > > > kills the > > > build when it produces > 4MB of log file, which is about 32K > > > lines of > > > log > > > files. 99% of those lines serve no real purpose other than to > > > bloat > > > the > > > output. > > > > > > [1] is an example travis run, started using a maven wrapper to > > > allow > > > maven > > > 3.3.9 to be used. (you may not be able to load it, as it's so > > > huge) > > > > > > ./mvnw -q > > > -Dmaven.surefire.debug="- > > > Dorg.slf4j.simpleLogger.defaultLogLevel=warn > > > -Dorg.apache.sling.commons.log.level=warn" clean install > > > -DHttpTestBase.readyTimeoutSeconds=300 -PintegrationTests > > > > > > The -q puts the maven logger in ERROR level. > > > The -Dmaven.surefire.debug="- > > > Dorg.slf4j.simpleLogger.defaultLogLevel=warn > > > -Dorg.apache.sling.commons.log.level=warn" causes forked surefire > > > processes > > > which log with SLF4J to log at WARN level. > > > > > > This all works, except many of the tests in Sling still log at > > > INFO > > > level, > > > presumably because it doesn't take any notice of the surefire > > > settings. > > > > > > Does anyone know how to prevent Felix when running Sling > > > tests from > > > logging 1000s of REGISTERED, UNREGISTERED messages ? > > > > There might be multiple issues here, but for the pax-exam tests, at > > least when using the provided logging wrapper you would need to > > configure the tests with > > > > > > CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog > > .l > > evel").value("WARN") > > > > Robert > > > > > > > > eg > > > > > > Running > > > org.apache.sling.commons.classloader.it.DynamicClassLoaderIT > > > > > > [main] INFO org.ops4j.pax.exam.spi.DefaultExamSystem - Pax Exam > > > System > > > (Version: 4.9.1) created. > > > > > > [main] INFO org.ops4j.pax.exam.junit.impl.ProbeRunner - creating > > > PaxExam > > > runner for class > > > org.apache.sling.commons.classloader.it.DynamicClassLoaderIT > > > [main] INFO org.ops4j.pax.exam.junit.impl.ProbeRunner - running > > > test > > > class > > > org.apache.sling.commons.classloader.it.DynamicClassLoaderIT > > > [main] INFO org.ops4j.exec.DefaultJavaRunner - DefaultJavaRunner > > > completed > > > successfully > > > > > > [org.ops4j.pax.swissbox.extender.BundleWatcher] : Creating bundle > > > watcher > > > with scanner [org.ops4j.pax.swissbox.extender.BundleManifestScann > > > er@3 > > > 5c29153]...[org.ops4j.pax.swissbox.extender.BundleWatcher] > > > : Scanning bundle > > > [org.apache.felix.framework][org.ops4j.pax.swissbox.extender.Bund > > > leWa > > > tcher] > > > : Scanning bundle > > > [org.ops4j.pax.exam][org.ops4j.pax.swissbox.extender.BundleWatche > > > r] : > > > Scanning bundle > > > [org.ops4j.pax.exam.inject][org.ops4j.pax.swissbox.extender.Bundl > > > eWat > > > cher] > > > : Scanning bundle > > > [org.ops4j.pax.exam.extender.service][org.ops4j.pax.swissbox.exte > > > nder > > > .BundleWatcher] > > > : Scanning bundle [osgi.cmpn] > > > > > > org.ops4j.pax.logging.pax-logging- > > > api[org.ops4j.pax.logging.internal.Activator] > > > : Enabling SLF4J API support. > > > If I can't find some way of reducing the output I will have to > > > resort > > > to > > > grep on the output of mvn. > > > > > > Best Regards > > > Ian > > > > > > > > > 1 https://travis-ci.org/apache/sling/jobs/147487804 > > > >