Re: [External] Re: How to encode %m or %ex ?

2018-01-25 Thread Fröstl , Christian
We are using log4j2 2.7. It's a hybris application and packaged with ant, or what do you want to know? On 25.01.18, 21:56, "Matt Sicker" wrote: Can you verify the version of Log4j you're using along with how you're packaging your application? On 25 January 2018 at 14:33, Fröstl, Ch

Re: [External] Re: How to encode %m or %ex ?

2018-01-25 Thread Matt Sicker
Can you verify the version of Log4j you're using along with how you're packaging your application? On 25 January 2018 at 14:33, Fröstl, Christian < christian.froe...@accenture.com> wrote: > Yes, you're right, this is exactly what I want. > If I use this %encode{%m}{JSON} notation, I only have the

Re: [External] Re: How to encode %m or %ex ?

2018-01-25 Thread Fröstl , Christian
Yes, you're right, this is exactly what I want. If I use this %encode{%m}{JSON} notation, I only have the string "%encode" in my logfiles and not a the encoded message field. Do you have an idea why this happens? On 25.01.18, 19:52, "Matt Sicker" wrote: Using %encode{%m}{JSON} will only e

Re: How to encode %m or %ex ?

2018-01-25 Thread Matt Sicker
Using %encode{%m}{JSON} will only encode the message so that it can be placed inside a JSON string with escapes already added. This is useful for creating custom JSON structures as your output. If you just want structured log output in general, the JSON layout (requires Jackson) is your best bet.

[ANN] Release of Apache Chainsaw 2.0.0

2018-01-25 Thread Matt Sicker
The Apache Logging Services project is pleased to announce the availability of Apache Chainsaw 2.0.0. This is a long-awaited release of the Chainsaw trunk/master code. Apache Chainsaw is a Java GUI application to search, watch, and gather log data from applications, particularly applications using

How to encode %m or %ex ?

2018-01-25 Thread Fröstl , Christian
Hi everybody, I like to encode the message and the exception field to JSON notation. From the docs https://logging.apache.org/log4j/2.x/manual/layouts.html I have the following notation: %encode{%m}{JSON} But this doesn't work. The only encoding which works success is the default HTML encoding,