On Tue, Dec 24, 2019 at 10:48 PM Volkan Yazıcı <volkan.yaz...@gmail.com> wrote:
> In its current form, LogstashLayout can (almost) very well render the
> GELF layout[1]. There are only two shortcomings: 1) epoch seconds with
> fraction and 2) using PatternLayout while rendering messages. But no
> worries, I will address them[2,3] in a couple of days.

I have finally released log4j2-logstash-layout v1.0.0[1], which
includes GELF layout[2]. Exposing epoch seconds of type double in the
JSON template variables as efficiently as Log4j 2.0 GelfLayout turned
out to be a tougher cookie than I was anticipating. But I can't
complain, thanks to the feature, I've stepped into the Jackson hall of
fame[3,4]. For those interested in, LogstashLayout is *still* the
fastest JSON layout and I've updated the benchmark[5] accordingly.

In my next adventure, I will see if I can beat PatternLayout with a
generic template engine, e.g., Rocker[6]. If that experiment turns out
to be positive, I will extend it with JsonLayout.

[1] 
https://github.com/vy/log4j2-logstash-layout/blob/master/CHANGELOG.md#2020-01-08-v100
[2] https://github.com/vy/log4j2-logstash-layout#predefined-templates
[3] https://github.com/FasterXML/jackson-core/pull/589
[4] https://github.com/FasterXML/jackson-core/pull/590
[5] https://github.com/vy/log4j2-logstash-layout#performance
[6] https://github.com/fizzed/rocker

Reply via email to