qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject qpid-broker-j git commit: QPID-8081: [Broker-J] Fix rolling of log files on restart with roll daily policy
Date Thu, 01 Feb 2018 14:58:51 GMT
Repository: qpid-broker-j
Updated Branches:
  refs/heads/master 5e1ae2dd6 -> 7410b29d1


QPID-8081: [Broker-J] Fix rolling of log files on restart with roll daily policy


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/7410b29d
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/7410b29d
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/7410b29d

Branch: refs/heads/master
Commit: 7410b29d11cc468ba133ecd6e9b486b1f21829fc
Parents: 5e1ae2d
Author: Alex Rudyy <orudyy@apache.org>
Authored: Thu Feb 1 14:33:11 2018 +0000
Committer: Alex Rudyy <orudyy@apache.org>
Committed: Thu Feb 1 14:33:11 2018 +0000

----------------------------------------------------------------------
 .../server/logging/logback/AppenderUtils.java   | 21 ++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/7410b29d/broker-plugins/logging-logback/src/main/java/org/apache/qpid/server/logging/logback/AppenderUtils.java
----------------------------------------------------------------------
diff --git a/broker-plugins/logging-logback/src/main/java/org/apache/qpid/server/logging/logback/AppenderUtils.java
b/broker-plugins/logging-logback/src/main/java/org/apache/qpid/server/logging/logback/AppenderUtils.java
index af1aaae..16fd87d 100644
--- a/broker-plugins/logging-logback/src/main/java/org/apache/qpid/server/logging/logback/AppenderUtils.java
+++ b/broker-plugins/logging-logback/src/main/java/org/apache/qpid/server/logging/logback/AppenderUtils.java
@@ -126,13 +126,12 @@ public class AppenderUtils
         }
 
         @Override
-        protected void computeNextCheck()
+        public void start()
         {
-            super.computeNextCheck();
-            if (_rollOnRestart && _isFirst)
+            super.start();
+            if (_rollOnRestart)
             {
-                _isFirst = false;
-                nextCheck = 0l;
+                nextCheck = 0L;
             }
         }
 
@@ -142,12 +141,14 @@ public class AppenderUtils
             if (_rollOnRestart && _isFirst)
             {
                 _isFirst = false;
-                return activeFile.exists() && activeFile.length() != 0l;
-            }
-            else
-            {
-                return super.isTriggeringEvent(activeFile, event);
+                if (activeFile.exists() && activeFile.length() == 0)
+                {
+                    computeNextCheck();
+                    return false;
+                }
             }
+
+            return super.isTriggeringEvent(activeFile, event);
         }
 
         public FileSize getMaxFileSize()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message