>>>>> Steinar Bang <s...@dod.no>:
>>>>> Eric Lilja <mindcoo...@gmail.com>:

>> A Pax Exam test that is using a Karaf container (which is a forked
>> container), often has two log configurations. One for the test itself
>> (for me that would be a log4j2-test.xml), and one for the
>> container. You can use
>> KarafDistributionOption.replaceConfigurationFile() to provision a
>> org.ops4j.pax.logging.cfg-file (so here I use a properties-style
>> file, not xml) with your desired settings. If you do, make sure to
>> also call doNotModifyLogConfiguration() on the same class
>> (KarafDistributionOption)

> Thanks! This worked to set the default karaf.log log level to TRACE:
>  
> https://github.com/steinarb/scratch/commit/67fcfff6665ab7ec674a1c6d50fe35f4b1d8b673

And, heh,... adding verbose log output, made the integration test stop
failing... Heisenbug!

(I'm guessing it's a timing issue, but finding it easy, because I
still don't have a way to debug the integration test running liquibase,
the liquibase feature load doesn't fail in regular karaf, and it doesn't
fail when running the code outside of OSGi in a unit test. Also, if I
had a way of debugging the integration test, I suspect the waiting for
the debugger would affect timing enough to make the test go green. Sigh!)

Reply via email to