Re: Is there an easy/recommended way to initialize Log4j2 so it works properly in a @Startup @Singleton EJB, or in a static EJB class member?

2016-06-20 Thread Matt Sicker
Have you tried using log4j as a server library instead of adding it to your deployment artifacts? If you do that, you should be able to avoid using log4j-web entirely as well which is mainly used for .war deployments. On 3 March 2016 at 07:54, Joachim Kanbach wrote: > Hi all, > >

Re: Question about several Async Loggers + RandomAccessFIle appenders with immediateFlush = false

2016-06-20 Thread Anthony Maire
I succeed to reproduce the issue I was suspecting to happen : https://issues.apache.org/jira/browse/LOG4J2-1441 2016-06-17 15:11 GMT+02:00 Anthony Maire : > Hello > > As suggested in AsyncLogger javadoc, I made some performance tests on my > application with

Re: How exactly are you supposed to use CloseableThreadContext?

2016-06-20 Thread Matt Sicker
That worked, thanks. I'll update the javadocs, too. On 20 June 2016 at 09:01, Greg Thomas wrote: > Ah, yes. It seems the javadocs are wrong :( They pre-date the > introduction of the helper class > > A better (i.e. working!) example is at >

Re: How exactly are you supposed to use CloseableThreadContext?

2016-06-20 Thread Greg Thomas
Ah, yes. It seems the javadocs are wrong :( They pre-date the introduction of the helper class A better (i.e. working!) example is at https://logging.apache.org/log4j/2.x/manual/thread-context.html @Test public void name() throws Exception { try (final CloseableThreadContext.Instance ctc =

How exactly are you supposed to use CloseableThreadContext?

2016-06-20 Thread Matt Sicker
I tried doing it like in the javadocs and get a compilation error: @Test public void name() throws Exception { try (CloseableThreadContext.put("key", "value")) { } } List of errors: RequestIdFilterTest.java:12: error: expected try (CloseableThreadContext.put("key", "value")) {

Re: Generating SNMP traps from Java Application

2016-06-20 Thread girish kulkarni
Mark Masterson compuserve.com> writes: > > Hi Swarna, > > Ah, fantastic. Swarna, I've been meaning to get to your mail (to me > directly) for about a week now, but I wanted to "cc" my reply to the > log4j list, since most of your questions are generic log4j questions, > and not specific to