[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v_0.9.25-20-g6a2c98f
added by portage for gitosis-gentoo
git-noreply at pixie.qos.ch
Thu Nov 4 22:15:00 CET 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Logback: the generic, reliable, fast and flexible logging framework.".
The branch, master has been updated
via 6a2c98fea1dbb7c864d3b13c502ff5ee72638b16 (commit)
from 5ea58922aea25355a84eb146b554fc72cc8af391 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=6a2c98fea1dbb7c864d3b13c502ff5ee72638b16
http://github.com/ceki/logback/commit/6a2c98fea1dbb7c864d3b13c502ff5ee72638b16
commit 6a2c98fea1dbb7c864d3b13c502ff5ee72638b16
Author: Ceki Gulcu <ceki at qos.ch>
Date: Thu Nov 4 22:13:43 2010 +0100
avoid output on folders outside target/test-output
diff --git a/logback-classic/src/test/groovy/ch/qos/logback/classic/sift/GSiftingAppenderTest.groovy b/logback-classic/src/test/groovy/ch/qos/logback/classic/sift/GSiftingAppenderTest.groovy
index c694e74..df62eea 100644
--- a/logback-classic/src/test/groovy/ch/qos/logback/classic/sift/GSiftingAppenderTest.groovy
+++ b/logback-classic/src/test/groovy/ch/qos/logback/classic/sift/GSiftingAppenderTest.groovy
@@ -31,6 +31,7 @@ import ch.qos.logback.core.status.StatusChecker
import ch.qos.logback.core.status.Status
import static junit.framework.Assert.assertNull
import org.junit.After
+import static ch.qos.logback.classic.ClassicTestConstants.OUTPUT_DIR_PREFIX;
/**
* @author Ceki Gücü
@@ -95,14 +96,14 @@ class GSiftingAppenderTest {
FileAppender unknownAppender = tracker.get("unknown", System.currentTimeMillis())
assertNotNull(unknownAppender)
assertEquals("FILE-unknown", unknownAppender.name)
- assertEquals("test-unknown.log", unknownAppender.file)
+ assertEquals(OUTPUT_DIR_PREFIX+"test-unknown.log", unknownAppender.file)
MDC.put("userid", "a");
logger.debug("y");
FileAppender aAppender = tracker.get("a", System.currentTimeMillis())
assertNotNull(aAppender)
assertEquals("FILE-a", aAppender.name)
- assertEquals("test-a.log", aAppender.file)
+ assertEquals(OUTPUT_DIR_PREFIX+"test-a.log", aAppender.file)
assertEquals("a - %msg%n", aAppender.encoder.pattern)
}
diff --git a/logback-classic/src/test/input/gaffer/sift/sample1.groovy b/logback-classic/src/test/input/gaffer/sift/sample1.groovy
index 702d1c8..82b4f4d 100644
--- a/logback-classic/src/test/input/gaffer/sift/sample1.groovy
+++ b/logback-classic/src/test/input/gaffer/sift/sample1.groovy
@@ -8,8 +8,7 @@ import static ch.qos.logback.classic.Level.DEBUG
import ch.qos.logback.classic.sift.GSiftingAppender
import ch.qos.logback.classic.sift.MDCBasedDiscriminator
import ch.qos.logback.core.FileAppender
-import ch.qos.logback.core.read.ListAppender
-
+import static ch.qos.logback.classic.ClassicTestConstants.OUTPUT_DIR_PREFIX;
appender("SIFT", GSiftingAppender) {
discriminator(MDCBasedDiscriminator) {
@@ -18,7 +17,7 @@ appender("SIFT", GSiftingAppender) {
}
sift {
appender("FILE-${userid}", FileAppender) {
- file = "test-${userid}.log"
+ file = OUTPUT_DIR_PREFIX+"test-${userid}.log"
append = false
encoder(PatternLayoutEncoder) {
println "in encoder userid=${userid}"
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/ClassicTestConstants.java b/logback-classic/src/test/java/ch/qos/logback/classic/ClassicTestConstants.java
index fab5c7e..a84c9e2 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/ClassicTestConstants.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/ClassicTestConstants.java
@@ -13,6 +13,8 @@
*/
package ch.qos.logback.classic;
+import ch.qos.logback.core.util.CoreTestConstants;
+
public class ClassicTestConstants {
final static public String ISO_REGEX = "\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3}";
final static public String NAKED_MAIN_REGEX = "[mM]ain(\\sThread)?";
@@ -20,4 +22,5 @@ public class ClassicTestConstants {
final static public String INPUT_PREFIX = "src/test/input/";
final static public String JORAN_INPUT_PREFIX = INPUT_PREFIX + "joran/";
final static public String GAFFER_INPUT_PREFIX = INPUT_PREFIX + "gaffer/";
+ final static public String OUTPUT_DIR_PREFIX= CoreTestConstants.OUTPUT_DIR_PREFIX;
}
-----------------------------------------------------------------------
Summary of changes:
.../classic/sift/GSiftingAppenderTest.groovy | 5 +++--
.../src/test/input/gaffer/sift/sample1.groovy | 5 ++---
.../qos/logback/classic/ClassicTestConstants.java | 3 +++
3 files changed, 8 insertions(+), 5 deletions(-)
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list