[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch master updated. v_1.0.0-57-g7900adb

Gitbot git-noreply at pixie.qos.ch
Wed Dec 21 11:49:27 CET 2011


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  7900adbea8f61de47e933d892cbaee1d61e9f111 (commit)
      from  a796df509de5feb8cdc6e9ff1c3c14093730121a (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=7900adbea8f61de47e933d892cbaee1d61e9f111
http://github.com/ceki/logback/commit/7900adbea8f61de47e933d892cbaee1d61e9f111

commit 7900adbea8f61de47e933d892cbaee1d61e9f111
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Wed Dec 21 11:47:57 2011 +0100

    rename parameter to AUX instead of SECONDARY

diff --git a/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/DateTokenConverter.java b/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/DateTokenConverter.java
index 5225d56..f779888 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/DateTokenConverter.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/DateTokenConverter.java
@@ -31,14 +31,14 @@ public class DateTokenConverter<E> extends DynamicConverter<E> implements MonoTy
    * The conversion word/character with which this converter is registered.
    */
   public final static String CONVERTER_KEY = "d";
-  public final static String SECONDARY_TOKEN = "SECONDARY";
+  public final static String AUXILIARY_TOKEN = "AUX";
   public static final String DEFAULT_DATE_PATTERN = CoreConstants.DAILY_DATE_PATTERN;
 
   private String datePattern;
   private CachingDateFormatter cdf;
-  // is this token converter primary or secondary? Only the primary converter
+  // is this token converter primary or auxiliary? Only the primary converter
   // determines the rolling period
-  private boolean secondary = false;
+  private boolean primary = true;
   public void start() {
     this.datePattern = getFirstOption();
     if (this.datePattern == null) {
@@ -48,8 +48,8 @@ public class DateTokenConverter<E> extends DynamicConverter<E> implements MonoTy
     final List<String> optionList = getOptionList();
     if(optionList != null && optionList.size()> 1) {
       String secondOption = optionList.get(1);
-      if(SECONDARY_TOKEN.equalsIgnoreCase(secondOption)) {
-        secondary = true;
+      if(AUXILIARY_TOKEN.equalsIgnoreCase(secondOption)) {
+        primary = false;
       }
     }
     cdf = new CachingDateFormatter(datePattern);
@@ -86,6 +86,6 @@ public class DateTokenConverter<E> extends DynamicConverter<E> implements MonoTy
   }
 
   public boolean isPrimary() {
-    return !secondary;
+    return primary;
   }
 }
diff --git a/logback-core/src/test/java/ch/qos/logback/core/rolling/helper/FileNamePatternTest.java b/logback-core/src/test/java/ch/qos/logback/core/rolling/helper/FileNamePatternTest.java
index 1336f63..115bd6c 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/rolling/helper/FileNamePatternTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/rolling/helper/FileNamePatternTest.java
@@ -145,8 +145,7 @@ public class FileNamePatternTest {
   public void convertMultipleDates() {
     Calendar cal = Calendar.getInstance();
     cal.set(2003, 4, 20, 17, 55);
-    FileNamePattern fnp = new FileNamePattern("foo-%d{yyyy.MM, SECONDARY}/%d{yyyy.MM.dd}.txt", context);
+    FileNamePattern fnp = new FileNamePattern("foo-%d{yyyy.MM, aux}/%d{yyyy.MM.dd}.txt", context);
     assertEquals("foo-2003.05/2003.05.20.txt", fnp.convert(cal.getTime()));
-
   }
 }

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

Summary of changes:
 .../core/rolling/helper/DateTokenConverter.java    |   12 ++++++------
 .../core/rolling/helper/FileNamePatternTest.java   |    3 +--
 2 files changed, 7 insertions(+), 8 deletions(-)


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


More information about the logback-dev mailing list