I would suggest you consider using MapMessage. The usage you are describing is
why it exists.
Ralph
> On Aug 14, 2020, at 12:48 PM, Naz S wrote:
>
> No, it's not.
>
> We just log it as a string.
>
> On Fri, Aug 14, 2020 at 7:22 PM Ralph Goers
> wrote:
>
>> Is the Message passed to the LogE
No, it's not.
We just log it as a string.
On Fri, Aug 14, 2020 at 7:22 PM Ralph Goers
wrote:
> Is the Message passed to the LogEvent a MapMessage?
>
> Ralph
>
> > On Aug 14, 2020, at 9:40 AM, Naz S wrote:
> >
> > Volkan,
> >
> > Wondering if the following case is supported by the logstash layo
Is the Message passed to the LogEvent a MapMessage?
Ralph
> On Aug 14, 2020, at 9:40 AM, Naz S wrote:
>
> Volkan,
>
> Wondering if the following case is supported by the logstash layout:
>
> Let's say logEvent.getMessage() contains the message like " key1=value1
> key2=value2 someString". The
Volkan,
Wondering if the following case is supported by the logstash layout:
Let's say logEvent.getMessage() contains the message like " key1=value1
key2=value2 someString". Then I want to parse that message and put to json:
{
"timestamp" :"x",
"key1" : "value1",
JsonTemplateLayout definitely supports access to MapMessage. Just try
searching for "MapMessage" in the documentation:
https://github.com/apache/logging-log4j2/blob/master/src/site/asciidoc/manual/json-template-layout.adoc
On Fri, Aug 14, 2020 at 5:14 PM Ralph Goers
wrote:
> Volkan - Do you not
Volkan - Do you not support the MapMessage? That is the standard way to handle
this and is what Log4j Audit does. It uses an AuditMessage that extends
MapMessage. In fact, I should be able to construct a template for AuditMessage
to use with JsonTemplateLayout in Log4j-Audit. If I cannot then
Hello Naz,
[Sorry for my late response.]
I am the author of LogstashLayout and also its successor JsonTemplateLayout
which will be merged into the release-2.x branch of Log4j (hopefully) in a
week or two.
LogstashLayout **does** support blank value elimination, you just need to
set emptyProperty
So far I have looked at the logstash layout (
https://github.com/vy/log4j2-logstash-layout). It seems it doesn't work
properly for my use case.
Basically if I have key,value pairs I log them into the LogEvent message
field, then I parse them while generating JSON objects. The key,value pairs
are
Thank you for your swift response, really appreciate it.
Wondering when the 2.14.0 release will come out?
On Wed, Aug 12, 2020 at 4:59 PM Ralph Goers
wrote:
> JsonTemplateLayout hasn’t been merged to the release-2.x branch but it
> will be so that it can be included in the 2.14.0 release.
>
>
JsonTemplateLayout hasn’t been merged to the release-2.x branch but it will be
so that it can be included in the 2.14.0 release.
Ralph
> On Aug 12, 2020, at 7:47 AM, Carter Kozak wrote:
>
> Hi Naz,
>
> Volkan has contributed a fantastic json template layout that I expect will do
> what you w
Hi Naz,
Volkan has contributed a fantastic json template layout that I expect will do
what you want, however it has not been released yet.
https://github.com/apache/logging-log4j2/pull/335
This discussion from the mailing list provides several options which may be
relevant to your use case:
htt
Hi,
I'm trying to use JSON layout for a logging format. When I use the default
JSON Layout, I see that there are some fields which are unnecessary to me
(for example, loggerFqcn, endOfBatch, etc).
Then I decided to implement a custom JSON layout. But I see that
JacksonFactory is not visible outsi
12 matches
Mail list logo