Skip to content

Commit

Permalink
DATACASS-35: Unit Tests for CassandraOperations : Fixed test logging
Browse files Browse the repository at this point in the history
confluct with log4j and logback.
  • Loading branch information
prowave committed Nov 27, 2013
1 parent 1d01ac9 commit 7f50e92
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>${cassandra-driver-core.version}</version>
<exclusions>
<exclusion>
<artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>

<!-- Spring -->
Expand Down Expand Up @@ -116,6 +122,12 @@
<version>${spring}</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.4</version>
</dependency>

<!-- CDI -->
<dependency>
<groupId>javax.enterprise</groupId>
Expand Down
6 changes: 6 additions & 0 deletions spring-cassandra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
<groupId>org.cassandraunit</groupId>
<artifactId>cassandra-unit</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.el</groupId>
Expand Down
18 changes: 18 additions & 0 deletions spring-cassandra/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<!-- pattern>%d %5p %40.40c:%4L - %m%n</pattern-->
<pattern>%d %5p | %t | %-55logger{55} | %m | %n</pattern>

</encoder>
</appender>

<logger name="org.springframework.cassandra" level="debug" />

<root level="warn">
<appender-ref ref="console" />
</root>

</configuration>
6 changes: 6 additions & 0 deletions spring-data-cassandra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
<groupId>org.cassandraunit</groupId>
<artifactId>cassandra-unit</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
18 changes: 18 additions & 0 deletions spring-data-cassandra/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<!-- pattern>%d %5p %40.40c:%4L - %m%n</pattern-->
<pattern>%d %5p | %t | %-55logger{55} | %m | %n</pattern>

</encoder>
</appender>

<logger name="org.springframework.cassandra" level="debug" />

<root level="warn">
<appender-ref ref="console" />
</root>

</configuration>

0 comments on commit 7f50e92

Please sign in to comment.