logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: Delivery Status Notification (Failure)
Date Mon, 12 May 2014 00:42:51 GMT
This configuration we are talking about, performance differences won't matter much IMO.


<div>-------- Original message --------</div><div>From: Matt Sicker <boards@gmail.com>
</div><div>Date:05/11/2014  20:02  (GMT-05:00) </div><div>To: Log4J
Developers List <log4j-dev@logging.apache.org> </div><div>Subject: Re: Delivery
Status Notification (Failure) </div><div>
</div>SAX or StAX could be faster, especially since we're not using the DOM per se but
a parallel in-memory DOM-like tree.

On 11 May 2014 18:46, Ralph Goers <ralph.goers@dslextreme.com> wrote:
I can't imagine what would be faster than traversing the DOM as we currently are.

Sent from my iPhone

On May 11, 2014, at 11:46 AM, Matt Sicker <boards@gmail.com> wrote:

JAXB wouldn't be as flexible as the current XML format, that's for sure. I've also read on
FasterXML's site that Woodstox is supposed to be faster than Jackson with XML, but I haven't
read much into that.

On 10 May 2014 22:24, Ralph Goers <ralph.goers@dslextreme.com> wrote:
The reason I did the XML configuration the way I did was because it was easy to map the Document
to Nodes. I thought about using JAXB but it didn't seem like a good fit. I didn't know about
Jackson at the time but I am not sure it would have been easier.

Sent from my iPhone

On May 10, 2014, at 7:45 PM, Gary Gregory <garydgregory@gmail.com> wrote:

FWIW, I am redoing the JSON and XML layouts to use the same Jackson code as
for reading them back in for the listener side. In my impl, the context map is a IO'd as a
map and the context stack as an array.

As you may have seen despite the mail outage, I've been committing in chunks for the pieces
I'll need before the new JSON/XML Jackson-based IO. Jackson is nice for that, we get 2-for-1,
which make me wonder why we do not do our config reading using Jackson for XML. I suppose
XML was impl'd before JSON and YAML.


On Sat, May 10, 2014 at 4:25 PM, <rgoers@apache.org> wrote:

> Author: rgoers
> Date: Sat May 10 20:25:28 2014
> New Revision: 1593727
> URL: http://svn.apache.org/r1593727
> Log:
> LOG4J2-623 - Format ThreadContext properties as a JSON map in JSONLayout
> Modified:
> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/JSONLayout.java
> logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/JSONLayoutTest.java
>     logging/log4j/log4j2/trunk/src/changes/changes.xml
> Modified:
> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/JSONLayout.java
> URL:
> http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/JSONLayout.java?rev=1593727&r1=1593726&r2=1593727&view=diff
> ==============================================================================
> ---
> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/JSONLayout.java
> (original)
> +++
> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/JSONLayout.java
> Sat May 10 20:25:28 2014
> @@ -253,34 +253,25 @@ public class JSONLayout extends Abstract
>              buf.append(',');
>              buf.append(this.eol);
>              buf.append(this.indent2);
> -            buf.append("\"Properties\":[");
> -            buf.append(this.eol);
> +            buf.append("\"Properties\": {");
>              final Set<Entry<String, String>> entrySet =
> event.getContextMap().entrySet();
>              int i = 1;
>              for (final Map.Entry<String, String> entry : entrySet) {
> -                buf.append(this.indent3);
> -                buf.append('{');
>                  buf.append(this.eol);

----- Message truncated -----

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

Matt Sicker <boards@gmail.com>

Matt Sicker <boards@gmail.com>
View raw message