Enable logging in karaf tests

This commit is contained in:
jamesagnew 2018-12-27 10:26:28 -05:00
parent 28218c9bba
commit 5bcf62ba44
2 changed files with 22 additions and 3 deletions

View File

@ -97,7 +97,11 @@
<artifactId>hapi-fhir-validation</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.ops4j.pax.url</groupId>
<artifactId>pax-url-aether</artifactId>
<version>2.5.4</version>
</dependency>
<!-- karaf test -->
<dependency>
@ -158,7 +162,19 @@
<version>1.3_1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>

View File

@ -54,6 +54,7 @@ import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.PaxExam;
import org.ops4j.pax.exam.karaf.options.LogLevelOption;
import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
import org.ops4j.pax.exam.spi.reactors.PerClass;
@ -76,6 +77,7 @@ import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.options;
import static org.ops4j.pax.exam.CoreOptions.when;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.debugConfiguration;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel;
/**
@ -97,7 +99,8 @@ public class Dstu3JsonParserTest {
mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.hamcrest").versionAsInProject(),
when(false)
.useOptions(
debugConfiguration("5005", true))
debugConfiguration("5005", true)),
logLevel(LogLevelOption.LogLevel.DEBUG)
);
}