Re: Making copies of LogEvent to avoid no-GC problems

2017-02-05 Thread Gary Gregory
On Thu, Jan 26, 2017 at 2:45 PM, Remko Popma wrote: > Yes, makes sense to me. > Remko > I have a patch attached here: https://issues.apache.org/jira/browse/LOG4J2-1807 But I'd like to be able to build on Windows before committing it... Gary > > Sent from my iPhone > > On Jan 27, 2017, at 3:3

Re: Making copies of LogEvent to avoid no-GC problems

2017-01-26 Thread Remko Popma
Yes, makes sense to me. Remko Sent from my iPhone > On Jan 27, 2017, at 3:32, Gary Gregory wrote: > > Hi All: > > Just like in our SMTP appender, I have a custom Appender which needs to track > LogEvents. To do this without falling prey to all of our no-GC epic > cleverness, the SMTP appen

Making copies of LogEvent to avoid no-GC problems

2017-01-26 Thread Gary Gregory
Hi All: Just like in our SMTP appender, I have a custom Appender which needs to track LogEvents. To do this without falling prey to all of our no-GC epic cleverness, the SMTP appender does this: public void add(LogEvent event) { if (event instanceof Log4jLogEvent && event.getMessage()