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.BundleManifestScanner@3
> 5c29153]...[org.ops4j.pax.swissbox.extender.BundleWatcher]
> : Scanning bundle
> [org.apache.felix.framework][org.ops4j.pax.swissbox.extender.BundleWa
> tcher]
> : Scanning bundle
> [org.ops4j.pax.exam][org.ops4j.pax.swissbox.extender.BundleWatcher] :
> Scanning bundle
> [org.ops4j.pax.exam.inject][org.ops4j.pax.swissbox.extender.BundleWat
> cher]
> : Scanning bundle
> [org.ops4j.pax.exam.extender.service][org.ops4j.pax.swissbox.extender
> .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