[logback-dev] branch, master, updated. 21b667f88d347ecacf1cb3ef60d159a3eba71d89

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Wed Dec 2 11:10:24 CET 2009


The branch, master has been updated
       via  21b667f88d347ecacf1cb3ef60d159a3eba71d89 (commit)
      from  d106f950fee98979df8f92537f47d5aea361b869 (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=21b667f88d347ecacf1cb3ef60d159a3eba71d89
http://github.com/ceki/logback/commit/21b667f88d347ecacf1cb3ef60d159a3eba71d89

commit 21b667f88d347ecacf1cb3ef60d159a3eba71d89
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Thu Dec 3 11:08:28 2009 +0100

    - investigating lbcore26

diff --git a/logback-classic/src/test/input/issue/lbcore26.xml b/logback-classic/src/test/input/issue/lbcore26.xml
new file mode 100644
index 0000000..ac56c83
--- /dev/null
+++ b/logback-classic/src/test/input/issue/lbcore26.xml
@@ -0,0 +1,18 @@
+<configuration scan="true">
+  <appender name="LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
+    <file>target/test-output/lbcore26.log </file>
+    
+    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+      <FileNamePattern>target/test-output/lbcore26.%d{yyyy-MM-dd}.log</FileNamePattern>
+      <MaxHistory>30</MaxHistory>
+    </rollingPolicy>
+    
+    <layout>
+      <Pattern>%date [%thread] %-5level %logger - %msg%n</Pattern>
+    </layout>
+  </appender>
+  
+  <root level="info">
+    <appender-ref ref="LOG" />
+  </root>
+</configuration> 
\ No newline at end of file
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 9e9e249..8bf96f0 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
@@ -18,5 +18,6 @@ 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)?";
   final static public String MAIN_REGEX =  "\\["+NAKED_MAIN_REGEX+"\\]";
-  final static public String JORAN_INPUT_PREFIX = "src/test/input/joran";
+  final static public String INPUT_PREFIX = "src/test/input/";
+  final static public String JORAN_INPUT_PREFIX = INPUT_PREFIX+"joran/";
 }
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbcore26/Main.java b/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbcore26/Main.java
new file mode 100644
index 0000000..d4e746b
--- /dev/null
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbcore26/Main.java
@@ -0,0 +1,32 @@
+package ch.qos.logback.classic.issue.lbcore26;
+
+import java.util.Date;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import ch.qos.logback.classic.ClassicTestConstants;
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.joran.JoranConfigurator;
+import ch.qos.logback.core.joran.spi.JoranException;
+import ch.qos.logback.core.util.StatusPrinter;
+
+public class Main {
+
+  public static void main(String[] args) throws JoranException {
+
+    LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
+    JoranConfigurator configurator = new JoranConfigurator();
+    configurator.setContext(lc);
+    configurator.doConfigure(ClassicTestConstants.INPUT_PREFIX
+        + "issue/lbcore26.xml");
+
+    StatusPrinter.printInCaseOfErrorsOrWarnings(lc);
+    Logger logger = LoggerFactory.getLogger(Main.class);
+    for (int i = 0; i < 16; i++) {
+      logger.info("hello " + new Date());
+    }
+
+  }
+
+}
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/net/SyslogAppenderTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/net/SyslogAppenderTest.java
index f6766dc..fe464de 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/net/SyslogAppenderTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/net/SyslogAppenderTest.java
@@ -151,7 +151,7 @@ public class SyslogAppenderTest {
     configurator.setContext(lc);
     lc.reset();
     configurator.doConfigure(ClassicTestConstants.JORAN_INPUT_PREFIX
-        + "/syslog_LBCLASSIC_50.xml");
+        + "syslog_LBCLASSIC_50.xml");
 
     org.slf4j.Logger logger = LoggerFactory.getLogger(this.getClass());
     logger.info("hello");
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/rolling/TimeBasedRollingWithConfigFileTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/rolling/TimeBasedRollingWithConfigFileTest.java
index 67bad61..3322ae8 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/rolling/TimeBasedRollingWithConfigFileTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/rolling/TimeBasedRollingWithConfigFileTest.java
@@ -66,7 +66,7 @@ public class TimeBasedRollingWithConfigFileTest extends
   public void basic() throws Exception {
     String testId = "basic";
     lc.putProperty("testId", testId);
-    loadConfig(ClassicTestConstants.JORAN_INPUT_PREFIX + "/rolling/" + testId
+    loadConfig(ClassicTestConstants.JORAN_INPUT_PREFIX + "rolling/" + testId
         + ".xml");
     StatusChecker sc = new StatusChecker(lc);
     assertTrue(sc.isErrorFree());
@@ -107,7 +107,7 @@ public class TimeBasedRollingWithConfigFileTest extends
     int approxWritesPerPeriod = 64;
     sizeThreshold = prefix.length() * approxWritesPerPeriod;
     lc.putProperty("sizeThreshold", "" + sizeThreshold);
-    loadConfig(ClassicTestConstants.JORAN_INPUT_PREFIX + "/rolling/" + testId
+    loadConfig(ClassicTestConstants.JORAN_INPUT_PREFIX + "rolling/" + testId
         + ".xml");
     Logger root = lc.getLogger(Logger.ROOT_LOGGER_NAME);
 
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/rolling/UniqueFileTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/rolling/UniqueFileTest.java
index c7f393d..38bec98 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/rolling/UniqueFileTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/rolling/UniqueFileTest.java
@@ -50,7 +50,7 @@ public class UniqueFileTest {
 
   @Test
   public void basic() throws Exception {
-    loadConfig(ClassicTestConstants.JORAN_INPUT_PREFIX + "/unique.xml");
+    loadConfig(ClassicTestConstants.JORAN_INPUT_PREFIX + "unique.xml");
     SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd'T'HHmmss");
     String timestamp = sdf.format(new Date()); 
     
diff --git a/logback-core/src/main/java/ch/qos/logback/core/rolling/DefaultTimeBasedFileNamingAndTriggeringPolicy.java b/logback-core/src/main/java/ch/qos/logback/core/rolling/DefaultTimeBasedFileNamingAndTriggeringPolicy.java
index ef19d9d..8c5a761 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/rolling/DefaultTimeBasedFileNamingAndTriggeringPolicy.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/rolling/DefaultTimeBasedFileNamingAndTriggeringPolicy.java
@@ -26,8 +26,6 @@ import ch.qos.logback.core.rolling.helper.DefaultArchiveRemover;
  */
 public class DefaultTimeBasedFileNamingAndTriggeringPolicy<E> extends TimeBasedFileNamingAndTriggeringPolicyBase<E> {
 
-  
-  
   @Override
   public void start() {
     super.start();
diff --git a/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingTest.java b/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingTest.java
index c912718..30b5c9c 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingTest.java
@@ -261,6 +261,9 @@ public class TimeBasedRollingTest extends ScaffoldingForRollingTests {
 
     rfa1.stop();
 
+
+    System.out.println("time before  wait "+SDF.format(new Date(currentTime)));
+    
     long fileTimestamp = currentTime;
     incCurrentTime(2000);
 
@@ -268,6 +271,7 @@ public class TimeBasedRollingTest extends ScaffoldingForRollingTests {
     initTRBP(rfa2, tbrp2, randomOutputDir + testId + "-%d{"
         + DATE_PATTERN_WITH_SECONDS + "}", currentTime, fileTimestamp);
 
+    System.out.println("time after   wait "+SDF.format(new Date(currentTime)));
     for (int i = 0; i <= 2; i++) {
       rfa2.doAppend("World---" + i);
       addExpectedFileNamedIfItsTime_ByDate(testId, false);

-----------------------------------------------------------------------

Summary of changes:
 logback-classic/src/test/input/issue/lbcore26.xml  |   18 +++++++++++
 .../qos/logback/classic/ClassicTestConstants.java  |    3 +-
 .../qos/logback/classic/issue/lbcore26/Main.java   |   32 ++++++++++++++++++++
 .../logback/classic/net/SyslogAppenderTest.java    |    2 +-
 .../TimeBasedRollingWithConfigFileTest.java        |    4 +-
 .../logback/classic/rolling/UniqueFileTest.java    |    2 +-
 ...aultTimeBasedFileNamingAndTriggeringPolicy.java |    2 -
 .../logback/core/rolling/TimeBasedRollingTest.java |    4 ++
 8 files changed, 60 insertions(+), 7 deletions(-)
 create mode 100644 logback-classic/src/test/input/issue/lbcore26.xml
 create mode 100644 logback-classic/src/test/java/ch/qos/logback/classic/issue/lbcore26/Main.java


hooks/post-receive
-- 
Logback: the generic, reliable, fast and flexible logging framework.


More information about the logback-dev mailing list