logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Fwd: logging-log4j2 git commit: LOG4J2-1252 - JeroMqAppender should support layouts
Date Thu, 03 Mar 2016 03:10:25 GMT
No tests? ;-)

Gary

---------- Forwarded message ----------
From: <mattsicker@apache.org>
Date: Wed, Mar 2, 2016 at 6:41 PM
Subject: logging-log4j2 git commit: LOG4J2-1252 - JeroMqAppender should
support layouts
To: commits@logging.apache.org


Repository: logging-log4j2
Updated Branches:
  refs/heads/master ebc53bbdc -> 60d1ccd93


LOG4J2-1252 - JeroMqAppender should support layouts


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

Branch: refs/heads/master
Commit: 60d1ccd9349e4601464d53926595146a59ac4beb
Parents: ebc53bb
Author: Matt Sicker <boards@gmail.com>
Authored: Wed Mar 2 20:42:04 2016 -0600
Committer: Matt Sicker <boards@gmail.com>
Committed: Wed Mar 2 20:42:04 2016 -0600

----------------------------------------------------------------------
 .../logging/log4j/core/appender/mom/jeromq/JeroMqAppender.java  | 5 +++--
 src/changes/changes.xml                                         | 3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/60d1ccd9/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/mom/jeromq/JeroMqAppender.java
----------------------------------------------------------------------
diff --git
a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/mom/jeromq/JeroMqAppender.java
b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/mom/jeromq/JeroMqAppender.java
index 974477b..99968e4 100644
---
a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/mom/jeromq/JeroMqAppender.java
+++
b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/mom/jeromq/JeroMqAppender.java
@@ -244,8 +244,9 @@ public final class JeroMqAppender extends
AbstractAppender {

     @Override
     public synchronized void append(final LogEvent event) {
-        final String formattedMessage =
event.getMessage().getFormattedMessage();
-        if (getPublisher().send(formattedMessage, 0)) {
+        final Layout<? extends Serializable> layout = getLayout();
+        final byte[] formattedMessage = layout.toByteArray(event);
+        if (getPublisher().send(getLayout().toByteArray(event))) {
             sendRcTrue++;
         } else {
             sendRcFalse++;

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/60d1ccd9/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 30f7a67..646a41f 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -181,6 +181,9 @@
       <action issue="LOG4J2-1262" dev="mattsicker" type="fix">
         Stop throwing unnecessary exception in
Log4jServletContextListener.contextDestroyed().
       </action>
+      <action issue="LOG4J2-1252" dev="mattsicker" type="add">
+        JeroMqAppender should support layouts.
+      </action>
     </release>
     <release version="2.5" date="2015-12-06" description="GA Release 2.5">
       <action issue="LOG4J2-324" dev="rpopma" type="fix">




-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
View raw message