logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1190740 - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core: appender/flume/Agent.java appender/flume/FlumeAvroAppender.java layout/RFC5424Layout.java
Date Sat, 29 Oct 2011 02:34:29 GMT
Author: rgoers
Date: Sat Oct 29 02:34:28 2011
New Revision: 1190740

URL: http://svn.apache.org/viewvc?rev=1190740&view=rev
Log:
Add toString methods and change FlumeEventFactory from PluginAttr to PluginElement.

Modified:
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/flume/Agent.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/flume/FlumeAvroAppender.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/flume/Agent.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/flume/Agent.java?rev=1190740&r1=1190739&r2=1190740&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/flume/Agent.java
(original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/flume/Agent.java
Sat Oct 29 02:34:28 2011
@@ -51,6 +51,10 @@ public class Agent {
         return port;
     }
 
+    public String toString() {
+        return "host=" + host + " port=" + port;
+    }
+
 
     @PluginFactory
     public static Agent createAgent(@PluginAttr("host") String host,

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/flume/FlumeAvroAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/flume/FlumeAvroAppender.java?rev=1190740&r1=1190739&r2=1190740&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/flume/FlumeAvroAppender.java
(original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/flume/FlumeAvroAppender.java
Sat Oct 29 02:34:28 2011
@@ -104,7 +104,7 @@ public class FlumeAvroAppender extends A
                                                    @PluginAttr("mdcPrefix") String mdcPrefix,
                                                    @PluginAttr("eventPrefix") String eventPrefix,
                                                    @PluginAttr("compress") String compressBody,
-                                                   @PluginAttr("flumeEventFactory") FlumeEventFactory
factory,
+                                                   @PluginElement("flumeEventFactory") FlumeEventFactory
factory,
                                                    @PluginElement("layout") Layout layout,
                                                    @PluginElement("filters") Filter filter)
{
 

Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java?rev=1190740&r1=1190739&r2=1190740&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
(original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
Sat Oct 29 02:34:28 2011
@@ -374,6 +374,18 @@ public class RFC5424Layout extends Abstr
         }
     }
 
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append("facility=").append(facility.name());
+        sb.append(" appName=").append(appName);
+        sb.append(" defaultId=").append(defaultId);
+        sb.append(" enterpriseNumber=").append(enterpriseNumber);
+        sb.append(" newLine=").append(includeNewLine);
+        sb.append(" includeMDC=").append(includeMDC);
+        sb.append(" messageId=").append(messageId);
+        return sb.toString();
+    }
+
     @PluginFactory
     public static RFC5424Layout createLayout(@PluginAttr("facility") String facility,
                                              @PluginAttr("id") String id,



Mime
View raw message