logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1491079 - in /logging/log4j/log4j2/trunk: flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAvroManager.java flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java src/changes/changes.xml
Date Sat, 08 Jun 2013 22:07:38 GMT
Author: rgoers
Date: Sat Jun  8 22:07:37 2013
New Revision: 1491079

URL: http://svn.apache.org/r1491079
Log:
LOG4J2-275 - FlumeAvroManager fails to notify client of failing event if Flume RPCClient cannot
be created.

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

Modified: logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAvroManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAvroManager.java?rev=1491079&r1=1491078&r2=1491079&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAvroManager.java
(original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAvroManager.java
Sat Jun  8 22:07:37 2013
@@ -144,6 +144,11 @@ public class FlumeAvroManager extends Ab
                 LOGGER.warn(msg, ex);
                 throw new AppenderRuntimeException("No Flume agents are available");
             }
+        }  else {
+            String msg = "Unable to write to " + getName() + " at " + agents[current].getHost()
+ ":" +
+                agents[current].getPort();
+            LOGGER.warn(msg);
+            throw new AppenderRuntimeException("No Flume agents are available");
         }
     }
 
@@ -164,6 +169,11 @@ public class FlumeAvroManager extends Ab
                 LOGGER.warn(msg, ex);
                 throw new AppenderRuntimeException("No Flume agents are available");
             }
+        } else {
+            String msg = "Unable to write to " + getName() + " at " + agents[current].getHost()
+ ":" +
+                agents[current].getPort();
+            LOGGER.warn(msg);
+            throw new AppenderRuntimeException("No Flume agents are available");
         }
     }
 

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=1491079&r1=1491078&r2=1491079&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
Sat Jun  8 22:07:37 2013
@@ -435,12 +435,10 @@ public class FlumePersistentManager exte
                                             LOGGER.error("Error sending event", ioe);
                                             break;
                                         }
-                                        if (!errors) {
-                                            try {
-                                                cursor.delete();
-                                            } catch (Exception ex) {
-                                                LOGGER.error("Unable to delete event", ex);
-                                            }
+                                        try {
+                                            cursor.delete();
+                                        } catch (Exception ex) {
+                                            LOGGER.error("Unable to delete event", ex);
                                         }
                                     }
                                     status = cursor.getNext(key, data, LockMode.RMW);

Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1491079&r1=1491078&r2=1491079&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/trunk/src/changes/changes.xml Sat Jun  8 22:07:37 2013
@@ -23,6 +23,9 @@
   </properties>
   <body>
     <release version="2.0-beta8" date="2013-??-??" description="Bug fixes and enhancements">
+      <action issue="LOG4J2-275" dev="rgoers" type="fix">
+        FlumeAvroManager fails to notify client of failing event if Flume RPCClient cannot
be created.
+      </action>
       <action issue="LOG4J2-274" dev="ggregory" type="update">
         Wasted work in UUIDUtil initialization.
       </action>



Mime
View raw message