On Thursday, May 19, 2016 at 11:10:45 AM UTC+9, Jerry Shea wrote:
> This is fantastic, thanks for this Remko.
> 
> 
> Can I ask a couple of questions?
> 1. is log4j 2.6 designed to operate garbage-free when used as an SLF4J 
> implementation too, or only with the native API?

The log4j-slf4j-impl binding is trying to be garbage-free, but the SLF4J API 
only offers up to two parameters for a parameterized message. More than that 
uses varargs which creates a temporary object for the parameter array. The 
native Log4j 2.6 API has methods for up to ten unrolled parameters. 

Another consideration is that the native Log4j 2 API lets you log Objects, not 
just Strings. Any Object that implements CharSequence can be logged without 
creating garbage.

You can also implement the log4j Message interface if you want to separate 
formatting from your business domain objects. 

Finally, the native Log4j 2 API has support for logging Java 8 lambdas (since 
2.4).
 
> 2. when do you expect log4j 2.6 to be released GA i.e. ready for production 
> use?

Barring any showstoppers, I expect it will be available in a week or so. 

> 
> 
> Thansk, Jerry
> 
> On Thursday, 19 May 2016 09:36:01 UTC+10, Remko Popma  wrote:
> Thank you Martin, appreciated! :-)
> 
> On Wednesday, May 18, 2016 at 2:33:55 AM UTC+9, Martin Thompson wrote:
> Hi Remko,
> 
> 
> I'd just like to say that it is a great service to the community as a whole 
> that someone is seriously looking at improving logging.
> 
> 
> If you keep it up you'll be putting folks like me out of a job :)
> 
> 
> Martin...
> 
> 
> 
> 
> On 17 May 2016 at 18:13, Remko Popma <remko...@gmail.com> wrote:
> 
> Hi all,
> 
> 
> First, my thanks to the many people who gave helpful advice and feedback on 
> how to measure Log4j response time on this list some time ago.
> 
> 
> We're about to start the Log4j 2.6 release.
> If anyone is interested, a preview of the garbage-free logging manual page is 
> here: http://home.apache.org/~rpopma/log4j/2.6/manual/garbagefree.html
> and a preview of the updated performance page is here: 
> http://home.apache.org/~rpopma/log4j/2.6/performance.html
> 
> 
> Feedback welcome!
> 
> 
> Remko
> 
> 
> 
> 
> 
> 
> -- 
> 
> You received this message because you are subscribed to the Google Groups 
> "mechanical-sympathy" group.
> 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to mechanical-sympathy+unsubscr...@googlegroups.com.
> 
> For more options, visit https://groups.google.com/d/optout.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to