logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1485060 - /logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
Date Wed, 22 May 2013 04:30:33 GMT
Author: rgoers
Date: Wed May 22 04:30:33 2013
New Revision: 1485060

URL: http://svn.apache.org/r1485060
Log:
Fix loop when there are no events. Remove setting console log level

Modified:
    logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java

Modified: logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java?rev=1485060&r1=1485059&r2=1485060&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
(original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
Wed May 22 04:30:33 2013
@@ -272,7 +272,6 @@ public class FlumePersistentManager exte
                 File dir = new File(data.dataDir);
                 FileUtils.mkdir(dir, true);
                 final EnvironmentConfig dbEnvConfig = new EnvironmentConfig();
-                dbEnvConfig.setConfigParam(EnvironmentConfig.CONSOLE_LOGGING_LEVEL, Level.SEVERE.toString());
                 dbEnvConfig.setTransactional(true);
                 dbEnvConfig.setAllowCreate(true);
                 dbEnvConfig.setLockTimeout(5, TimeUnit.SECONDS);
@@ -466,7 +465,7 @@ public class FlumePersistentManager exte
                         LOGGER.warn("WriterThread encountered an exception. Continuing.",
ex);
                     }
                 } else {
-                    while (!shutdown && database.count() < batchSize &&
nextBatch > now) {
+                    while (!shutdown && (database.count() == 0 || database.count()
< batchSize && nextBatch > now)) {
                         try {
                             long interval = nextBatch - now;
                             queue.poll(interval, TimeUnit.MILLISECONDS);



Mime
View raw message