Announcement: log4j2-logstash-layout v0.15 is released

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Announcement: log4j2-logstash-layout v0.15 is released

Volkan Yazıcı
Hello,

In addition to the JSONLayout
<https://logging.apache.org/log4j/2.0/manual/layouts.html#JSONLayout>
shipped by default in Log4j 2, there is also another layout plugin that you
can render customized JSONs: log4j2-logstash-layout
<https://github.com/vy/log4j2-logstash-layout>. A couple of hours ago I
have released the v0.15 of the plugin to Maven Central. This release ships
a garbage-free implementation that makes *log4j2-logstash-layout the
fastest and only garbage-free JSON layout* plugin out there in the wild. If
you have a use case for JSON layout, you should definitely give
log4j2-logstash-layout a try. As usual, feedback is welcome.

Cheers!
Reply | Threaded
Open this post in threaded view
|

Re: Announcement: log4j2-logstash-layout v0.15 is released

Gary Gregory-4
Hi,

You might want to create a PR for
https://logging.apache.org/log4j/2.x/articles.html and add your plugin to a
new section called "Resources".

Gary

On Fri, Nov 23, 2018 at 1:15 PM Volkan Yazıcı <[hidden email]>
wrote:

> Hello,
>
> In addition to the JSONLayout
> <https://logging.apache.org/log4j/2.0/manual/layouts.html#JSONLayout>
> shipped by default in Log4j 2, there is also another layout plugin that you
> can render customized JSONs: log4j2-logstash-layout
> <https://github.com/vy/log4j2-logstash-layout>. A couple of hours ago I
> have released the v0.15 of the plugin to Maven Central. This release ships
> a garbage-free implementation that makes *log4j2-logstash-layout the
> fastest and only garbage-free JSON layout* plugin out there in the wild. If
> you have a use case for JSON layout, you should definitely give
> log4j2-logstash-layout a try. As usual, feedback is welcome.
>
> Cheers!
>
Reply | Threaded
Open this post in threaded view
|

Re: Announcement: log4j2-logstash-layout v0.15 is released

Remko Popma-2
I’ll add an Apache blog entry announcement for this as a community artifact when I have a chance.

Remko.
(Shameless plug) Every java main() method deserves http://picocli.info

> On Nov 24, 2018, at 9:52, Gary Gregory <[hidden email]> wrote:
>
> Hi,
>
> You might want to create a PR for
> https://logging.apache.org/log4j/2.x/articles.html and add your plugin to a
> new section called "Resources".
>
> Gary
>
> On Fri, Nov 23, 2018 at 1:15 PM Volkan Yazıcı <[hidden email]>
> wrote:
>
>> Hello,
>>
>> In addition to the JSONLayout
>> <https://logging.apache.org/log4j/2.0/manual/layouts.html#JSONLayout>
>> shipped by default in Log4j 2, there is also another layout plugin that you
>> can render customized JSONs: log4j2-logstash-layout
>> <https://github.com/vy/log4j2-logstash-layout>. A couple of hours ago I
>> have released the v0.15 of the plugin to Maven Central. This release ships
>> a garbage-free implementation that makes *log4j2-logstash-layout the
>> fastest and only garbage-free JSON layout* plugin out there in the wild. If
>> you have a use case for JSON layout, you should definitely give
>> log4j2-logstash-layout a try. As usual, feedback is welcome.
>>
>> Cheers!
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Announcement: log4j2-logstash-layout v0.15 is released

Remko Popma-2
Blogged:
https://blogs.apache.org/logging/entry/log4j2-logstash-layout-v0-15

Please share on social media!

Remko.
(Shameless plug) Every java main() method deserves http://picocli.info

On Saturday, November 24, 2018, Remko Popma <[hidden email]> wrote:

> I’ll add an Apache blog entry announcement for this as a community
> artifact when I have a chance.
>
> Remko.
> (Shameless plug) Every java main() method deserves http://picocli.info
>
> > On Nov 24, 2018, at 9:52, Gary Gregory <[hidden email]> wrote:
> >
> > Hi,
> >
> > You might want to create a PR for
> > https://logging.apache.org/log4j/2.x/articles.html and add your plugin
> to a
> > new section called "Resources".
> >
> > Gary
> >
> > On Fri, Nov 23, 2018 at 1:15 PM Volkan Yazıcı <[hidden email]>
> > wrote:
> >
> >> Hello,
> >>
> >> In addition to the JSONLayout
> >> <https://logging.apache.org/log4j/2.0/manual/layouts.html#JSONLayout>
> >> shipped by default in Log4j 2, there is also another layout plugin that
> you
> >> can render customized JSONs: log4j2-logstash-layout
> >> <https://github.com/vy/log4j2-logstash-layout>. A couple of hours ago I
> >> have released the v0.15 of the plugin to Maven Central. This release
> ships
> >> a garbage-free implementation that makes *log4j2-logstash-layout the
> >> fastest and only garbage-free JSON layout* plugin out there in the
> wild. If
> >> you have a use case for JSON layout, you should definitely give
> >> log4j2-logstash-layout a try. As usual, feedback is welcome.
> >>
> >> Cheers!
> >>
>
Reply | Threaded
Open this post in threaded view
|

Re: Announcement: log4j2-logstash-layout v0.15 is released

Volkan Yazıcı
Awesome! Thanks so much! (Retweeted.)

On Sat, Nov 24, 2018 at 3:11 AM Remko Popma <[hidden email]> wrote:

> Blogged:
> https://blogs.apache.org/logging/entry/log4j2-logstash-layout-v0-15
>
> Please share on social media!
>
> Remko.
> (Shameless plug) Every java main() method deserves http://picocli.info
>
> On Saturday, November 24, 2018, Remko Popma <[hidden email]> wrote:
>
> > I’ll add an Apache blog entry announcement for this as a community
> > artifact when I have a chance.
> >
> > Remko.
> > (Shameless plug) Every java main() method deserves http://picocli.info
> >
> > > On Nov 24, 2018, at 9:52, Gary Gregory <[hidden email]> wrote:
> > >
> > > Hi,
> > >
> > > You might want to create a PR for
> > > https://logging.apache.org/log4j/2.x/articles.html and add your plugin
> > to a
> > > new section called "Resources".
> > >
> > > Gary
> > >
> > > On Fri, Nov 23, 2018 at 1:15 PM Volkan Yazıcı <[hidden email]
> >
> > > wrote:
> > >
> > >> Hello,
> > >>
> > >> In addition to the JSONLayout
> > >> <https://logging.apache.org/log4j/2.0/manual/layouts.html#JSONLayout>
> > >> shipped by default in Log4j 2, there is also another layout plugin
> that
> > you
> > >> can render customized JSONs: log4j2-logstash-layout
> > >> <https://github.com/vy/log4j2-logstash-layout>. A couple of hours
> ago I
> > >> have released the v0.15 of the plugin to Maven Central. This release
> > ships
> > >> a garbage-free implementation that makes *log4j2-logstash-layout the
> > >> fastest and only garbage-free JSON layout* plugin out there in the
> > wild. If
> > >> you have a use case for JSON layout, you should definitely give
> > >> log4j2-logstash-layout a try. As usual, feedback is welcome.
> > >>
> > >> Cheers!
> > >>
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Announcement: log4j2-logstash-layout v0.15 is released

Volkan Yazıcı
In reply to this post by Gary Gregory-4
I would be more than happy to do that. Though I have some questions:

   1. Are you sure you want me to create a "Resources" section in the
   "Articles and Tutorials" page, that is, articles.adoc? It feels like a
   little bit out of context given the name of the page is "Articles and
   Tutorials".
   2. Further, site.xml, the source for the left menu, will still link the
   page with "Articles and Tutorials" name, which omits the "Resources".
   3. And... Will the page still be called "articles.html"?

Sorry for the death by thousand minor question cuts. I did not want to
submit a PR without having a clear idea on how to proceed.

On Sat, Nov 24, 2018 at 1:53 AM Gary Gregory <[hidden email]> wrote:

> Hi,
>
> You might want to create a PR for
> https://logging.apache.org/log4j/2.x/articles.html and add your plugin to
> a
> new section called "Resources".
>
> Gary
>
> On Fri, Nov 23, 2018 at 1:15 PM Volkan Yazıcı <[hidden email]>
> wrote:
>
> > Hello,
> >
> > In addition to the JSONLayout
> > <https://logging.apache.org/log4j/2.0/manual/layouts.html#JSONLayout>
> > shipped by default in Log4j 2, there is also another layout plugin that
> you
> > can render customized JSONs: log4j2-logstash-layout
> > <https://github.com/vy/log4j2-logstash-layout>. A couple of hours ago I
> > have released the v0.15 of the plugin to Maven Central. This release
> ships
> > a garbage-free implementation that makes *log4j2-logstash-layout the
> > fastest and only garbage-free JSON layout* plugin out there in the wild.
> If
> > you have a use case for JSON layout, you should definitely give
> > log4j2-logstash-layout a try. As usual, feedback is welcome.
> >
> > Cheers!
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Announcement: log4j2-logstash-layout v0.15 is released

Matt Sicker
I’d keep the name of the URL the same unless you also add an htaccess http
redirect for the old file. Cool URLs don’t change! 😊

On Sat, Nov 24, 2018 at 06:15, Volkan Yazıcı <[hidden email]>
wrote:

> I would be more than happy to do that. Though I have some questions:
>
>    1. Are you sure you want me to create a "Resources" section in the
>    "Articles and Tutorials" page, that is, articles.adoc? It feels like a
>    little bit out of context given the name of the page is "Articles and
>    Tutorials".
>    2. Further, site.xml, the source for the left menu, will still link the
>    page with "Articles and Tutorials" name, which omits the "Resources".
>    3. And... Will the page still be called "articles.html"?
>
> Sorry for the death by thousand minor question cuts. I did not want to
> submit a PR without having a clear idea on how to proceed.
>
> On Sat, Nov 24, 2018 at 1:53 AM Gary Gregory <[hidden email]>
> wrote:
>
> > Hi,
> >
> > You might want to create a PR for
> > https://logging.apache.org/log4j/2.x/articles.html and add your plugin
> to
> > a
> > new section called "Resources".
> >
> > Gary
> >
> > On Fri, Nov 23, 2018 at 1:15 PM Volkan Yazıcı <[hidden email]>
> > wrote:
> >
> > > Hello,
> > >
> > > In addition to the JSONLayout
> > > <https://logging.apache.org/log4j/2.0/manual/layouts.html#JSONLayout>
> > > shipped by default in Log4j 2, there is also another layout plugin that
> > you
> > > can render customized JSONs: log4j2-logstash-layout
> > > <https://github.com/vy/log4j2-logstash-layout>. A couple of hours ago
> I
> > > have released the v0.15 of the plugin to Maven Central. This release
> > ships
> > > a garbage-free implementation that makes *log4j2-logstash-layout the
> > > fastest and only garbage-free JSON layout* plugin out there in the
> wild.
> > If
> > > you have a use case for JSON layout, you should definitely give
> > > log4j2-logstash-layout a try. As usual, feedback is welcome.
> > >
> > > Cheers!
> > >
> >
>
--
Matt Sicker <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Log4j2 Kafka application fails application startup

Bhavesh Patel
 Hi Log4j2 developers,                                   Do we have a status on bug (https://jira.apache.org/jira/browse/LOG4J2-2162)? Or is there a workaround for this issue? We are moving from log4j1 to log4j2 and will be using the Kafka appender for our production systems. This would be a major issue for us that if kafka server is down, the application itself fails to start up and would result in loss of revenues. IS there any recommendation to handle/bypass initializing the appender. We also have a rolling file appender which we can fallback to.
Regards,Bhavesh.


 
Reply | Threaded
Open this post in threaded view
|

Re: Log4j2 Kafka application fails application startup

Matt Sicker
You can use the FailoverAppender as a workaround. Set up a file appender or
similar as your failover option so that logging still works. Adding a
feature to replay logs to an appender when it comes back online, however,
would be a separate task.

On Sun, 25 Nov 2018 at 23:21, Bhavesh Patel <[hidden email]>
wrote:

>  Hi Log4j2 developers,                                   Do we have a
> status on bug (https://jira.apache.org/jira/browse/LOG4J2-2162)? Or is
> there a workaround for this issue? We are moving from log4j1 to log4j2 and
> will be using the Kafka appender for our production systems. This would be
> a major issue for us that if kafka server is down, the application itself
> fails to start up and would result in loss of revenues. IS there any
> recommendation to handle/bypass initializing the appender. We also have a
> rolling file appender which we can fallback to.
> Regards,Bhavesh.
>
>
>



--
Matt Sicker <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Log4j2 Kafka application fails application startup

Bhavesh Patel
 No that won't work. Failover works when the kafka servers are available at application startup time and goes down sometime after the application is up and running. That works fine for us. But if the kafka servers are not available during the application startup time, the application fails to start giving an exception. Availability/Unavailability of logging should not block an application from starting up. The same issue is mentioned in the bug reference I mentioned in my email.
Regards,Bhavesh.
    On Monday, November 26, 2018, 10:31:36 AM PST, Matt Sicker <[hidden email]> wrote:  
 
 You can use the FailoverAppender as a workaround. Set up a file appender or
similar as your failover option so that logging still works. Adding a
feature to replay logs to an appender when it comes back online, however,
would be a separate task.

On Sun, 25 Nov 2018 at 23:21, Bhavesh Patel <[hidden email]>
wrote:

>  Hi Log4j2 developers,                                  Do we have a
> status on bug (https://jira.apache.org/jira/browse/LOG4J2-2162)? Or is
> there a workaround for this issue? We are moving from log4j1 to log4j2 and
> will be using the Kafka appender for our production systems. This would be
> a major issue for us that if kafka server is down, the application itself
> fails to start up and would result in loss of revenues. IS there any
> recommendation to handle/bypass initializing the appender. We also have a
> rolling file appender which we can fallback to.
> Regards,Bhavesh.
>
>
>



--
Matt Sicker <[hidden email]>
 
Reply | Threaded
Open this post in threaded view
|

Re: Log4j2 Kafka application fails application startup

Ralph Goers
Yes, I can see why that happens. The KafkaManager’s start method would throw an exception that isn’t handled. Normally, just the component should fail not the whole configuration. Since the component is already wired in if it fails to start every attempt to write to it will silently fail. Any fix for this should include logic to reconnect and throw an exception if there is no producer so that the failover appender can deal with it.

Ralph



> On Nov 26, 2018, at 11:36 AM, Bhavesh Patel <[hidden email]> wrote:
>
> No that won't work. Failover works when the kafka servers are available at application startup time and goes down sometime after the application is up and running. That works fine for us. But if the kafka servers are not available during the application startup time, the application fails to start giving an exception. Availability/Unavailability of logging should not block an application from starting up. The same issue is mentioned in the bug reference I mentioned in my email.
> Regards,Bhavesh.
>    On Monday, November 26, 2018, 10:31:36 AM PST, Matt Sicker <[hidden email]> wrote:  
>
> You can use the FailoverAppender as a workaround. Set up a file appender or
> similar as your failover option so that logging still works. Adding a
> feature to replay logs to an appender when it comes back online, however,
> would be a separate task.
>
> On Sun, 25 Nov 2018 at 23:21, Bhavesh Patel <[hidden email]>
> wrote:
>
>>   Hi Log4j2 developers,                                  Do we have a
>> status on bug (https://jira.apache.org/jira/browse/LOG4J2-2162)? Or is
>> there a workaround for this issue? We are moving from log4j1 to log4j2 and
>> will be using the Kafka appender for our production systems. This would be
>> a major issue for us that if kafka server is down, the application itself
>> fails to start up and would result in loss of revenues. IS there any
>> recommendation to handle/bypass initializing the appender. We also have a
>> rolling file appender which we can fallback to.
>> Regards,Bhavesh.
>>
>>
>>
>
>
>
> --
> Matt Sicker <[hidden email]>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]