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

Gitbot git-noreply at pixie.qos.ch
Thu Nov 10 22:50:11 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  9c58b9e8202939b9a5888fb3896a88f82e04966b (commit)
      from  87c417adfa4fdd21035a1c6ebe5480b23bea8a4c (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=9c58b9e8202939b9a5888fb3896a88f82e04966b
http://github.com/ceki/logback/commit/9c58b9e8202939b9a5888fb3896a88f82e04966b

commit 9c58b9e8202939b9a5888fb3896a88f82e04966b
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Thu Nov 10 22:49:02 2011 +0100

    removed redundant check in computeCurrentPeriodsHighestCounterValue

diff --git a/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP.java b/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP.java
index 570235e..bf17391 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP.java
@@ -53,8 +53,8 @@ public class SizeAndTimeBasedFNATP<E> extends
 
   void computeCurrentPeriodsHighestCounterValue(final String stemRegex) {
     File file = new File(getCurrentPeriodsFileNameWithoutCompressionSuffix());
-
     File parentDir = file.getParentFile();
+
     File[] matchingFileArray = FileFilterUtil
             .filesInFolderMatchingStemRegex(parentDir, stemRegex);
 
@@ -64,19 +64,11 @@ public class SizeAndTimeBasedFNATP<E> extends
     }
     currentPeriodsCounter = FileFilterUtil.findHighestCounter(matchingFileArray, stemRegex);
 
-
     // if parent raw file property is not null, then the next
     // counter is max  found counter+1
-    if (tbrp.getParentsRawFileProperty() != null) {
-      currentPeriodsCounter++;
-    } else if(tbrp.compressionMode != CompressionMode.NONE) {
-      // if raw file property == null, but compression is enabled
-      // we must check whether the last file whether the last file is
-      // compressed or not.
+    if (tbrp.getParentsRawFileProperty() != null || (tbrp.compressionMode != CompressionMode.NONE)) {
       // TODO test me
-      File fileCandidate = new File(getFileNameIncludingCompressionSuffix(dateInCurrentPeriod, currentPeriodsCounter));
-      if(fileCandidate.exists())
-        currentPeriodsCounter++;
+      currentPeriodsCounter++;
     }
   }
 

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

Summary of changes:
 .../core/rolling/SizeAndTimeBasedFNATP.java        |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)


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


More information about the logback-dev mailing list