Repository: logging-log4j2
Updated Branches:
  refs/heads/master 3390ebe84 -> a0f4f4db5


Use an ExecutorService to verify shutdown of the async threads


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/a0f4f4db
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/a0f4f4db
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/a0f4f4db

Branch: refs/heads/master
Commit: a0f4f4db5e8e88e56eaa148d81c2ba91df606e2a
Parents: 3390ebe
Author: Ralph Goers <[email protected]>
Authored: Tue Jan 24 14:48:34 2017 -0700
Committer: Ralph Goers <[email protected]>
Committed: Tue Jan 24 14:48:48 2017 -0700

----------------------------------------------------------------------
 .../logging/log4j/core/LoggerContext.java       |  2 +-
 .../appender/AbstractOutputStreamAppender.java  |  1 +
 .../rolling/DefaultRolloverStrategy.java        |  4 +-
 .../appender/rolling/RollingFileManager.java    | 93 +++++++++++++++++++-
 .../rolling/action/CommonsCompressAction.java   | 19 ++--
 .../rolling/RollingAppenderSizeTest.java        | 41 ++++++++-
 .../test/resources/log4j-rolling-bzip2-lazy.xml |  4 +-
 .../src/test/resources/log4j-rolling-bzip2.xml  |  4 +-
 .../resources/log4j-rolling-deflate-lazy.xml    |  4 +-
 .../test/resources/log4j-rolling-deflate.xml    |  4 +-
 .../test/resources/log4j-rolling-gz-lazy.xml    |  2 +-
 .../src/test/resources/log4j-rolling-gz.xml     |  2 +-
 .../resources/log4j-rolling-pack200-lazy.xml    |  4 +-
 .../test/resources/log4j-rolling-pack200.xml    |  4 +-
 .../test/resources/log4j-rolling-xz-lazy.xml    |  4 +-
 .../src/test/resources/log4j-rolling-xz.xml     |  4 +-
 .../test/resources/log4j-rolling-zip-lazy.xml   |  4 +-
 .../src/test/resources/log4j-rolling-zip.xml    |  4 +-
 18 files changed, 167 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
index dda319b..cd15dce 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
@@ -358,7 +358,7 @@ public class LoggerContext extends AbstractLifeCycle
             configLock.unlock();
             this.setStopped();
         }
-        LOGGER.debug("Stopped LoggerContext[name={}, {}]...", getName(), this);
+        LOGGER.debug("Stopped LoggerContext[name={}, {}] with status {}", 
getName(), this, true);
         return true;
     }
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.java
index 30cc229..1e6f3e4 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.java
@@ -143,6 +143,7 @@ public abstract class AbstractOutputStreamAppender<M 
extends OutputStreamManager
         if (changeLifeCycleState) {
             setStopped();
         }
+        LOGGER.debug("Appender {} stopped with status {}", getName(), stopped);
         return stopped;
     }
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
index 1c9e5d5..c8373d7 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
@@ -222,7 +222,7 @@ public class DefaultRolloverStrategy extends 
AbstractRolloverStrategy {
                 eligibleFiles.remove(key);
                 renameFiles = true;
             } catch (IOException ioe) {
-                LOGGER.error("Unable to delete {}", eligibleFiles.firstKey(), 
ioe);
+                LOGGER.error("Unable to delete {}, {}", 
eligibleFiles.firstKey(), ioe.getMessage(), ioe);
                 break;
             }
         }
@@ -275,7 +275,7 @@ public class DefaultRolloverStrategy extends 
AbstractRolloverStrategy {
                 Files.delete(eligibleFiles.get(key));
                 eligibleFiles.remove(key);
             } catch (IOException ioe) {
-                LOGGER.error("Unable to delete {}", eligibleFiles.firstKey(), 
ioe);
+                LOGGER.error("Unable to delete {}, {}", 
eligibleFiles.firstKey(), ioe.getMessage(), ioe);
                 break;
             }
         }

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
index c6932f4..1e5f1ea 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
@@ -22,7 +22,11 @@ import java.io.IOException;
 import java.io.OutputStream;
 import java.io.Serializable;
 import java.nio.ByteBuffer;
+import java.util.Collection;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Semaphore;
+import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
 
@@ -47,6 +51,7 @@ public class RollingFileManager extends FileManager {
 
     private static RollingFileManagerFactory factory = new 
RollingFileManagerFactory();
     private static final int MAX_TRIES = 3;
+    private static final int MIN_DURATION = 100;
 
     protected long size;
     private long initialTime;
@@ -59,6 +64,10 @@ public class RollingFileManager extends FileManager {
     private volatile boolean initialized = false;
     private volatile String fileName;
     private FileExtension fileExtension;
+    /* This executor pool will create a new Thread for every work async action 
to be performed. Using it allows
+       us to make sure all the Threads are completed when the Manager is 
stopped. */
+    private ExecutorService asyncExecutor = new ThreadPoolExecutor(0, 
Integer.MAX_VALUE, 0, TimeUnit.MILLISECONDS,
+            new EmptyQueue(), threadFactory);
 
     private static final AtomicReferenceFieldUpdater<RollingFileManager, 
TriggeringPolicy> triggeringPolicyUpdater =
             AtomicReferenceFieldUpdater.newUpdater(RollingFileManager.class, 
TriggeringPolicy.class, "triggeringPolicy");
@@ -110,6 +119,7 @@ public class RollingFileManager extends FileManager {
     }
 
     public void initialize() {
+
         if (!initialized) {
             LOGGER.debug("Initializing triggering policy {}", 
triggeringPolicy);
             initialized = true;
@@ -210,6 +220,7 @@ public class RollingFileManager extends FileManager {
 
     @Override
     public boolean releaseSub(final long timeout, final TimeUnit timeUnit) {
+        LOGGER.debug("Shutting down RollingFileManager {}" + getName());
         boolean stopped = true;
         if (triggeringPolicy instanceof LifeCycle2) {
             stopped &= ((LifeCycle2) triggeringPolicy).stop(timeout, timeUnit);
@@ -217,7 +228,46 @@ public class RollingFileManager extends FileManager {
             ((LifeCycle) triggeringPolicy).stop();
             stopped &= true;
         }
-        return stopped && super.releaseSub(timeout, timeUnit);
+        boolean status = super.releaseSub(timeout, timeUnit) && stopped;
+        asyncExecutor.shutdown();
+        try {
+            // Allow at least the minimum interval to pass so async actions 
can complete.
+            long millis = timeUnit.toMillis(timeout);
+            long waitInterval = MIN_DURATION < millis ? millis : MIN_DURATION;
+
+            for (int count = 1; count <= MAX_TRIES && 
!asyncExecutor.isTerminated(); ++count) {
+                asyncExecutor.awaitTermination(waitInterval * count, 
TimeUnit.MILLISECONDS);
+            }
+            if (asyncExecutor.isTerminated()) {
+                LOGGER.debug("All asynchronous threads have terminated");
+            } else {
+                asyncExecutor.shutdownNow();
+                try {
+                    asyncExecutor.awaitTermination(timeout, timeUnit);
+                    if (asyncExecutor.isTerminated()) {
+                        LOGGER.debug("All asynchronous threads have 
terminated");
+                    } else {
+                        LOGGER.debug("RollingFileManager shutting down but 
some asynchronous services may not have completed");
+                    }
+                } catch (final InterruptedException inner) {
+                    LOGGER.warn("RollingFileManager stopped but some 
asynchronous services may not have completed.");
+                }
+            }
+        } catch (final InterruptedException ie) {
+            asyncExecutor.shutdownNow();
+            try {
+                asyncExecutor.awaitTermination(timeout, timeUnit);
+                if (asyncExecutor.isTerminated()) {
+                    LOGGER.debug("All asynchronous threads have terminated");
+                }
+            } catch (final InterruptedException inner) {
+                LOGGER.warn("RollingFileManager stopped but some asynchronous 
services may not have completed.");
+            }
+            // Preserve interrupt status
+            Thread.currentThread().interrupt();
+        }
+        LOGGER.debug("RollingFileManager shutdown completed with status {}", 
status);
+        return status;
     }
 
     public synchronized void rollover() {
@@ -323,8 +373,7 @@ public class RollingFileManager extends FileManager {
 
                 if (success && descriptor.getAsynchronous() != null) {
                     LOGGER.debug("RollingFileManager executing async {}", 
descriptor.getAsynchronous());
-                    thread = threadFactory.newThread(new 
AsyncAction(descriptor.getAsynchronous(), this));
-                    thread.start();
+                    asyncExecutor.execute(new 
AsyncAction(descriptor.getAsynchronous(), this));
                 }
                 return true;
             }
@@ -549,4 +598,42 @@ public class RollingFileManager extends FileManager {
         }
     }
 
+    private static class EmptyQueue extends ArrayBlockingQueue<Runnable> {
+
+        EmptyQueue() {
+            super(1);
+        }
+
+        @Override
+        public int remainingCapacity() {
+            return 0;
+        }
+
+        @Override
+        public boolean add(Runnable runnable) {
+            throw new IllegalStateException("Queue is full");
+        }
+
+        @Override
+        public void put(Runnable runnable) throws InterruptedException {
+            /* No point in going into a permanent wait */
+            throw new InterruptedException("Unable to insert into queue");
+        }
+
+        @Override
+        public boolean offer(Runnable runnable, long timeout, TimeUnit 
timeUnit) throws InterruptedException {
+            Thread.sleep(timeUnit.toMillis(timeout));
+            return false;
+        }
+
+        @Override
+        public boolean addAll(Collection<? extends Runnable> collection) {
+            if (collection.size() > 0) {
+                throw new IllegalArgumentException("Too many items in 
collection");
+            }
+            return false;
+        }
+
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CommonsCompressAction.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CommonsCompressAction.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CommonsCompressAction.java
index d80287f..f0b5dd2 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CommonsCompressAction.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CommonsCompressAction.java
@@ -21,6 +21,7 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.nio.file.Files;
 import java.util.Objects;
 
 import org.apache.commons.compress.compressors.CompressorException;
@@ -107,17 +108,23 @@ public final class CommonsCompressAction extends 
AbstractAction {
                         new 
CompressorStreamFactory().createCompressorOutputStream(name, new 
FileOutputStream(
                                 destination)))) {
             IOUtils.copy(input, output, BUF_SIZE);
+            LOGGER.debug("Finished {} compression of {}", name, 
source.getPath() );
         } catch (final CompressorException e) {
             throw new IOException(e);
-        } finally {
-            LOGGER.debug("Finished {} compression of {}", name, 
source.getPath() );
         }
 
-        if (deleteSource && !source.delete()) {
-            LOGGER.warn("Unable to delete " + source.toString() + '.');
-        } else {
-            LOGGER.debug("Deleted {}", source.toString());
+        if (deleteSource) {
+            try {
+                if (Files.deleteIfExists(source.toPath())) {
+                    LOGGER.debug("Deleted {}", source.toString());
+                } else {
+                    LOGGER.warn("Unable to delete {} after {} compression. 
File did not exist", source.toString(), name);
+                }
+            } catch (Exception ex) {
+                LOGGER.warn("Unable to delete {} after {} compression, {}", 
source.toString(), name, ex.getMessage());
+            }
         }
+
         return true;
     }
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderSizeTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderSizeTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderSizeTest.java
index 70b2653..5b6f80e 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderSizeTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderSizeTest.java
@@ -28,10 +28,14 @@ import static org.junit.Assert.fail;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.IOException;
 import java.nio.charset.Charset;
+import java.nio.file.FileVisitResult;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.nio.file.SimpleFileVisitor;
+import java.nio.file.attribute.BasicFileAttributes;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.concurrent.TimeUnit;
@@ -44,6 +48,7 @@ import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.core.appender.RollingFileAppender;
 import org.apache.logging.log4j.core.util.Closer;
 import org.apache.logging.log4j.junit.LoggerContextRule;
+import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Rule;
@@ -104,6 +109,12 @@ public class RollingAppenderSizeTest {
         this.logger = 
this.loggerContextRule.getLogger(RollingAppenderSizeTest.class.getName());
     }
 
+    @After
+    public void cleanup() throws Exception {
+        Path path = new File(DIR).toPath();
+        cleanFolder(path);
+    }
+
     @Test
     public void testIsCreateOnDemand() {
         final RollingFileAppender rfAppender = 
loggerContextRule.getRequiredAppender("RollingFile",
@@ -119,8 +130,9 @@ public class RollingAppenderSizeTest {
         if (Files.exists(path) && createOnDemand) {
             Assert.fail(String.format("Unexpected file: %s (%s bytes)", path, 
Files.getAttribute(path, "size")));
         }
-        for (int i = 0; i < 100; ++i) {
+        for (int i = 0; i < 500; ++i) {
             logger.debug("This is test message number " + i);
+            Thread.sleep(1);
         }
         try {
             Thread.sleep(100);
@@ -139,7 +151,7 @@ public class RollingAppenderSizeTest {
             return; // Apache Commons Compress cannot deflate zip? TODO test 
decompressing these formats
         }
         // Stop the context to make sure all files are compressed and closed. 
Trying to remedy failures in CI builds.
-        if (loggerContextRule.getLoggerContext().stop(30, TimeUnit.SECONDS)) {
+        if (!loggerContextRule.getLoggerContext().stop(30, TimeUnit.SECONDS)) {
             System.err.println("Could not stop cleanly " + loggerContextRule + 
" for " + this);
         }
         for (final File file : files) {
@@ -154,7 +166,12 @@ public class RollingAppenderSizeTest {
                     }
                     final ByteArrayOutputStream baos = new 
ByteArrayOutputStream();
                     assertNotNull("No input stream for " + file.getName(), in);
-                    IOUtils.copy(in, baos);
+                    try {
+                        IOUtils.copy(in, baos);
+                    } catch (final Exception ex) {
+                        ex.printStackTrace();
+                        fail("Unable to decompress " + file.getAbsolutePath());
+                    }
                     final String text = new String(baos.toByteArray(), 
Charset.defaultCharset());
                     final String[] lines = text.split("[\\r\\n]+");
                     for (final String line : lines) {
@@ -167,4 +184,22 @@ public class RollingAppenderSizeTest {
             }
         }
     }
+
+    private void cleanFolder(final Path folder) throws IOException {
+        if (Files.exists(folder) && Files.isDirectory(folder)) {
+            Files.walkFileTree(folder, new SimpleFileVisitor<Path>() {
+                @Override
+                public FileVisitResult postVisitDirectory(final Path dir, 
final IOException exc) throws IOException {
+                    Files.deleteIfExists(dir);
+                    return FileVisitResult.CONTINUE;
+                }
+
+                @Override
+                public FileVisitResult visitFile(final Path file, final 
BasicFileAttributes attrs) throws IOException {
+                    Files.deleteIfExists(file);
+                    return FileVisitResult.CONTINUE;
+                }
+            });
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/test/resources/log4j-rolling-bzip2-lazy.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j-rolling-bzip2-lazy.xml 
b/log4j-core/src/test/resources/log4j-rolling-bzip2-lazy.xml
index eed50b1..cdbd9b5 100644
--- a/log4j-core/src/test/resources/log4j-rolling-bzip2-lazy.xml
+++ b/log4j-core/src/test/resources/log4j-rolling-bzip2-lazy.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="OFF" name="XMLConfigTest">
+<Configuration status="WARN" name="XMLConfigTest">
   <Properties>
     <Property name="filename">target/rolling1/rollingtest.log</Property>
   </Properties>
@@ -32,7 +32,7 @@
       <PatternLayout>
         <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
       </PatternLayout>
-      <SizeBasedTriggeringPolicy size="500" />
+      <SizeBasedTriggeringPolicy size="2000" />
       <DefaultRolloverStrategy compressionLevel="9" />
     </RollingFile>
     <List name="List">

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/test/resources/log4j-rolling-bzip2.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j-rolling-bzip2.xml 
b/log4j-core/src/test/resources/log4j-rolling-bzip2.xml
index 39d4f49..df38672 100644
--- a/log4j-core/src/test/resources/log4j-rolling-bzip2.xml
+++ b/log4j-core/src/test/resources/log4j-rolling-bzip2.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="OFF" name="XMLConfigTest">
+<Configuration status="WARN" name="XMLConfigTest">
   <Properties>
     <Property name="filename">target/rolling1/rollingtest.log</Property>
   </Properties>
@@ -31,7 +31,7 @@
       <PatternLayout>
         <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
       </PatternLayout>
-      <SizeBasedTriggeringPolicy size="500" />
+      <SizeBasedTriggeringPolicy size="2000" />
       <DefaultRolloverStrategy compressionLevel="9" />
     </RollingFile>
     <List name="List">

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/test/resources/log4j-rolling-deflate-lazy.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j-rolling-deflate-lazy.xml 
b/log4j-core/src/test/resources/log4j-rolling-deflate-lazy.xml
index 1501db7..edaa321 100644
--- a/log4j-core/src/test/resources/log4j-rolling-deflate-lazy.xml
+++ b/log4j-core/src/test/resources/log4j-rolling-deflate-lazy.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="OFF" name="XMLConfigTest">
+<Configuration status="WARN" name="XMLConfigTest">
   <Properties>
     <Property name="filename">target/rolling1/rollingtest.log</Property>
   </Properties>
@@ -32,7 +32,7 @@
       <PatternLayout>
         <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
       </PatternLayout>
-      <SizeBasedTriggeringPolicy size="500" />
+      <SizeBasedTriggeringPolicy size="5000" />
       <DefaultRolloverStrategy compressionLevel="9" />
     </RollingFile>
     <List name="List">

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/test/resources/log4j-rolling-deflate.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j-rolling-deflate.xml 
b/log4j-core/src/test/resources/log4j-rolling-deflate.xml
index e4afa91..1a5c561 100644
--- a/log4j-core/src/test/resources/log4j-rolling-deflate.xml
+++ b/log4j-core/src/test/resources/log4j-rolling-deflate.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="OFF" name="XMLConfigTest">
+<Configuration status="WARN" name="XMLConfigTest">
   <Properties>
     <Property name="filename">target/rolling1/rollingtest.log</Property>
   </Properties>
@@ -31,7 +31,7 @@
       <PatternLayout>
         <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
       </PatternLayout>
-      <SizeBasedTriggeringPolicy size="500" />
+      <SizeBasedTriggeringPolicy size="5000" />
       <DefaultRolloverStrategy compressionLevel="9" />
     </RollingFile>
     <List name="List">

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/test/resources/log4j-rolling-gz-lazy.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j-rolling-gz-lazy.xml 
b/log4j-core/src/test/resources/log4j-rolling-gz-lazy.xml
index fb85da5..f5c08bc 100644
--- a/log4j-core/src/test/resources/log4j-rolling-gz-lazy.xml
+++ b/log4j-core/src/test/resources/log4j-rolling-gz-lazy.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="OFF" name="XMLConfigTest">
+<Configuration status="WARN" name="XMLConfigTest">
   <Properties>
     <Property name="filename">target/rolling1/rollingtest.log</Property>
   </Properties>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/test/resources/log4j-rolling-gz.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j-rolling-gz.xml 
b/log4j-core/src/test/resources/log4j-rolling-gz.xml
index efddd34..209cb1c 100644
--- a/log4j-core/src/test/resources/log4j-rolling-gz.xml
+++ b/log4j-core/src/test/resources/log4j-rolling-gz.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="OFF" name="XMLConfigTest">
+<Configuration status="WARN" name="XMLConfigTest">
   <Properties>
     <Property name="filename">target/rolling1/rollingtest.log</Property>
   </Properties>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/test/resources/log4j-rolling-pack200-lazy.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j-rolling-pack200-lazy.xml 
b/log4j-core/src/test/resources/log4j-rolling-pack200-lazy.xml
index db8a6dd..52792c5 100644
--- a/log4j-core/src/test/resources/log4j-rolling-pack200-lazy.xml
+++ b/log4j-core/src/test/resources/log4j-rolling-pack200-lazy.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="OFF" name="XMLConfigTest">
+<Configuration status="WARN" name="XMLConfigTest">
   <Properties>
     <Property name="filename">target/rolling1/rollingtest.log</Property>
   </Properties>
@@ -32,7 +32,7 @@
       <PatternLayout>
         <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
       </PatternLayout>
-      <SizeBasedTriggeringPolicy size="500" />
+      <SizeBasedTriggeringPolicy size="2000" />
       <DefaultRolloverStrategy compressionLevel="9" />
     </RollingFile>
     <List name="List">

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/test/resources/log4j-rolling-pack200.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j-rolling-pack200.xml 
b/log4j-core/src/test/resources/log4j-rolling-pack200.xml
index 8d1feb0..4a31c04 100644
--- a/log4j-core/src/test/resources/log4j-rolling-pack200.xml
+++ b/log4j-core/src/test/resources/log4j-rolling-pack200.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="OFF" name="XMLConfigTest">
+<Configuration status="WARN" name="XMLConfigTest">
   <Properties>
     <Property name="filename">target/rolling1/rollingtest.log</Property>
   </Properties>
@@ -31,7 +31,7 @@
       <PatternLayout>
         <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
       </PatternLayout>
-      <SizeBasedTriggeringPolicy size="500" />
+      <SizeBasedTriggeringPolicy size="2000" />
       <DefaultRolloverStrategy compressionLevel="9" />
     </RollingFile>
     <List name="List">

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/test/resources/log4j-rolling-xz-lazy.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j-rolling-xz-lazy.xml 
b/log4j-core/src/test/resources/log4j-rolling-xz-lazy.xml
index 560741c..5d01723 100644
--- a/log4j-core/src/test/resources/log4j-rolling-xz-lazy.xml
+++ b/log4j-core/src/test/resources/log4j-rolling-xz-lazy.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="OFF" name="XMLConfigTest">
+<Configuration status="WARN" name="XMLConfigTest">
   <Properties>
     <Property name="filename">target/rolling1/rollingtest.log</Property>
   </Properties>
@@ -32,7 +32,7 @@
       <PatternLayout>
         <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
       </PatternLayout>
-      <SizeBasedTriggeringPolicy size="500" />
+      <SizeBasedTriggeringPolicy size="2000" />
       <DefaultRolloverStrategy compressionLevel="9" />
     </RollingFile>
     <List name="List">

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/test/resources/log4j-rolling-xz.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j-rolling-xz.xml 
b/log4j-core/src/test/resources/log4j-rolling-xz.xml
index 5b588c3..70673da 100644
--- a/log4j-core/src/test/resources/log4j-rolling-xz.xml
+++ b/log4j-core/src/test/resources/log4j-rolling-xz.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="OFF" name="XMLConfigTest">
+<Configuration status="WARN" name="XMLConfigTest">
   <Properties>
     <Property name="filename">target/rolling1/rollingtest.log</Property>
   </Properties>
@@ -31,7 +31,7 @@
       <PatternLayout>
         <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
       </PatternLayout>
-      <SizeBasedTriggeringPolicy size="500" />
+      <SizeBasedTriggeringPolicy size="2000" />
       <DefaultRolloverStrategy compressionLevel="9" />
     </RollingFile>
     <List name="List">

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/test/resources/log4j-rolling-zip-lazy.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j-rolling-zip-lazy.xml 
b/log4j-core/src/test/resources/log4j-rolling-zip-lazy.xml
index 06249d8..11389b1 100644
--- a/log4j-core/src/test/resources/log4j-rolling-zip-lazy.xml
+++ b/log4j-core/src/test/resources/log4j-rolling-zip-lazy.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="OFF" name="XMLConfigTest">
+<Configuration status="WARN" name="XMLConfigTest">
   <Properties>
     <Property name="filename">target/rolling1/rollingtest.log</Property>
   </Properties>
@@ -32,7 +32,7 @@
       <PatternLayout>
         <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
       </PatternLayout>
-      <SizeBasedTriggeringPolicy size="500" />
+      <SizeBasedTriggeringPolicy size="2000" />
       <DefaultRolloverStrategy compressionLevel="9" />
     </RollingFile>
     <List name="List">

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a0f4f4db/log4j-core/src/test/resources/log4j-rolling-zip.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j-rolling-zip.xml 
b/log4j-core/src/test/resources/log4j-rolling-zip.xml
index 8bb4a3e..ed031e3 100644
--- a/log4j-core/src/test/resources/log4j-rolling-zip.xml
+++ b/log4j-core/src/test/resources/log4j-rolling-zip.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="OFF" name="XMLConfigTest">
+<Configuration status="WARN" name="XMLConfigTest">
   <Properties>
     <Property name="filename">target/rolling1/rollingtest.log</Property>
   </Properties>
@@ -31,7 +31,7 @@
       <PatternLayout>
         <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
       </PatternLayout>
-      <SizeBasedTriggeringPolicy size="500" />
+      <SizeBasedTriggeringPolicy size="2000" />
       <DefaultRolloverStrategy compressionLevel="9" />
     </RollingFile>
     <List name="List">

Reply via email to