JAMES-2554 Use logback in tests
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/34f10299 Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/34f10299 Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/34f10299 Branch: refs/heads/master Commit: 34f10299003853fc30a87812ba693fcc0a3c6234 Parents: e536e62 Author: Antoine Duprat <adup...@linagora.com> Authored: Tue Oct 9 09:50:47 2018 +0200 Committer: Benoit Tellier <btell...@linagora.com> Committed: Wed Oct 10 15:47:38 2018 +0700 ---------------------------------------------------------------------- .../mailrepository-cassandra/pom.xml | 5 +++ .../src/test/resources/logback-test.xml | 43 ++++++++++++++++++++ 2 files changed, 48 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/34f10299/server/mailrepository/mailrepository-cassandra/pom.xml ---------------------------------------------------------------------- diff --git a/server/mailrepository/mailrepository-cassandra/pom.xml b/server/mailrepository/mailrepository-cassandra/pom.xml index 479a90f..506fe9e 100644 --- a/server/mailrepository/mailrepository-cassandra/pom.xml +++ b/server/mailrepository/mailrepository-cassandra/pom.xml @@ -78,6 +78,11 @@ <scope>test</scope> </dependency> <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/james-project/blob/34f10299/server/mailrepository/mailrepository-cassandra/src/test/resources/logback-test.xml ---------------------------------------------------------------------- diff --git a/server/mailrepository/mailrepository-cassandra/src/test/resources/logback-test.xml b/server/mailrepository/mailrepository-cassandra/src/test/resources/logback-test.xml new file mode 100644 index 0000000..cf76022 --- /dev/null +++ b/server/mailrepository/mailrepository-cassandra/src/test/resources/logback-test.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<configuration> + + <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"> + <resetJUL>true</resetJUL> + </contextListener> + + <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx</pattern> + <immediateFlush>false</immediateFlush> + </encoder> + </appender> + + <root level="WARN"> + <appender-ref ref="CONSOLE" /> + </root> + + + <logger name="org.apache.james.mailrepository.cassandra" level="DEBUG" > + <appender-ref ref="CONSOLE" /> + </logger> + +</configuration> --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org