Browse Source

Merge pull request #32 from jochenberger/use-slf4j

Improve logging
pull/10/merge
kallestenflo 11 years ago
parent
commit
8efe638758
  1. 1
      json-path/src/main/java/com/jayway/jsonpath/JsonPath.java
  2. 15
      json-path/src/test/resources/logback-test.xml
  3. 22
      pom.xml

1
json-path/src/main/java/com/jayway/jsonpath/JsonPath.java

@ -22,6 +22,7 @@ import com.jayway.jsonpath.internal.filter.PathTokenFilter;
import com.jayway.jsonpath.spi.HttpProviderFactory;
import com.jayway.jsonpath.spi.JsonProvider;
import com.jayway.jsonpath.spi.JsonProviderFactory;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

15
json-path/src/test/resources/logback-test.xml

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<contextName>myAppName</contextName>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%-5level [%t] %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="com.jayway.jsonpath" level="TRACE"/>
<root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration>

22
pom.xml

@ -57,7 +57,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<slf4j.version>1.7.5</slf4j.version>
<logback.version>1.0.13</logback.version>
<junit.version>4.10</junit.version>
<commons-io.version>2.4</commons-io.version>
<commons-lang.version>3.1</commons-lang.version>
@ -125,7 +124,16 @@
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<systemPropertyVariables>
<org.slf4j.simpleLogger.defaultLogLevel>debug</org.slf4j.simpleLogger.defaultLogLevel>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
@ -232,9 +240,9 @@
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
@ -270,8 +278,8 @@
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>

Loading…
Cancel
Save