logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpo...@apache.org
Subject svn commit: r1566251 - in /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling: ./ action/
Date Sun, 09 Feb 2014 08:24:18 GMT
Author: rpopma
Date: Sun Feb  9 08:24:18 2014
New Revision: 1566251

URL: http://svn.apache.org/r1566251
Log:
emit debug-level status log messages during rollover

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CompositeAction.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/GZCompressAction.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressAction.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java?rev=1566251&r1=1566250&r2=1566251&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
Sun Feb  9 08:24:18 2014
@@ -161,13 +161,10 @@ public class RollingFileManager extends 
 
         try {
             final RolloverDescription descriptor = strategy.rollover(this);
-
             if (descriptor != null) {
-
                 close();
-
                 if (descriptor.getSynchronous() != null) {
-
+                    LOGGER.debug("RollingFileManager executing synchronous {}", descriptor.getSynchronous());
                     try {
                         success = descriptor.getSynchronous().execute();
                     } catch (final Exception ex) {
@@ -176,6 +173,7 @@ public class RollingFileManager extends 
                 }
 
                 if (success && descriptor.getAsynchronous() != null) {
+                    LOGGER.debug("RollingFileManager executing async {}", descriptor.getAsynchronous());
                     thread = new Thread(new AsyncAction(descriptor.getAsynchronous(), this));
                     thread.start();
                 }

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CompositeAction.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CompositeAction.java?rev=1566251&r1=1566250&r2=1566251&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CompositeAction.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CompositeAction.java
Sun Feb  9 08:24:18 2014
@@ -17,6 +17,7 @@
 package org.apache.logging.log4j.core.appender.rolling.action;
 
 import java.io.IOException;
+import java.util.Arrays;
 import java.util.List;
 
 
@@ -97,4 +98,9 @@ public class CompositeAction extends Abs
 
         return status;
     }
+    
+    @Override
+    public String toString() {
+        return CompositeAction.class.getSimpleName() + Arrays.toString(actions);
+    }
 }

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java?rev=1566251&r1=1566250&r2=1566251&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java
Sun Feb  9 08:24:18 2014
@@ -143,4 +143,10 @@ public class FileRenameAction extends Ab
             }
         }
     }
+    
+    @Override
+    public String toString() {
+        return FileRenameAction.class.getSimpleName() + "[" + source + " to " + destination
//
+                + ", renameEmptyFiles=" + renameEmptyFiles + "]";
+    }
 }

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/GZCompressAction.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/GZCompressAction.java?rev=1566251&r1=1566250&r2=1566251&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/GZCompressAction.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/GZCompressAction.java
Sun Feb  9 08:24:18 2014
@@ -125,5 +125,10 @@ public final class GZCompressAction exte
     protected void reportException(final Exception ex) {
         LOGGER.warn("Exception during compression of '" + source.toString() + "'.", ex);
     }
-
+    
+    @Override
+    public String toString() {
+        return GZCompressAction.class.getSimpleName() + "[" + source + " to " + destination
//
+                + ", deleteSource=" + deleteSource + "]";
+    }
 }

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressAction.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressAction.java?rev=1566251&r1=1566250&r2=1566251&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressAction.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressAction.java
Sun Feb  9 08:24:18 2014
@@ -137,4 +137,10 @@ public final class ZipCompressAction ext
     protected void reportException(final Exception ex) {
         LOGGER.warn("Exception during compression of '" + source.toString() + "'.", ex);
     }
+    
+    @Override
+    public String toString() {
+        return ZipCompressAction.class.getSimpleName() + "[" + source + " to " + destination
//
+                + ", level=" + level + ", deleteSource=" + deleteSource + "]";
+    }
 }



Mime
View raw message