Re: Async logger not logging after upgrading tomcat, jdk and log4j

2024-01-26 Thread Piotr P. Karwasz
Joan,

On Fri, 26 Jan 2024 at 13:33,  wrote:
> Issue fixed. The problem was in the disruptor library, which we also migrated 
> from 3.4.4 to 4.0.0. Downgrading again to 3.4.4. fixed the problem.

Thank you for sharing your solution with us. Since nobody was able to
diagnose this problem from your status logs, I opened issue #2250[1]
to add the correct log statements during the initialization of LMAX
Disruptor.

Note also, that the upcoming version 2.23.0 will support both LMAX
Disruptor 3.x and 4.x (cf. issue #1829[2]), so you'll be able to
upgrade to 4.x.

As far as version 3.x of Log4j is concerned, our upcoming 3.0.0-beta2
will feature a separate `log4j-async-logger` artifact with a
non-optional dependency on `com.lmax.disruptor:disruptor`[3]. We hope
to relieve users from the burden of upgrading the Disruptor library
themselves and rely on the transitive dependency in
`log4j-async-logger`.

Piotr

[1] https://github.com/apache/logging-log4j2/issues/2250
[2] https://github.com/apache/logging-log4j2/issues/1829
[3] https://github.com/apache/logging-log4j2/pull/2241

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



RE: Async logger not logging after upgrading tomcat, jdk and log4j

2024-01-26 Thread joan.balaguero
Hi,

Issue fixed. The problem was in the disruptor library, which we also migrated 
from 3.4.4 to 4.0.0. Downgrading again to 3.4.4. fixed the problem.

Regards,

Joan.

-Original Message-
From: Piotr P. Karwasz  
Sent: Thursday, January 25, 2024 1:20 PM
To: Log4J Users List 
Subject: Re: Async logger not logging after upgrading tomcat, jdk and log4j

Hi Joan,

On Thu, 25 Jan 2024 at 12:06,  wrote:
> My application has been using async logging for years by setting this env 
> variable on tomcat 8.5.x running on java 11 with log4j-2.15/6/7/8/9:
> -DLog4jContextSelector=org.apache.logging.log4j.core.async.BasicAsyncL
> oggerContextSelector
>
> Now we have migrated to Tomcat 10.1.18, java 17 and log4j-2.22.1. With the 
> above variable set, nothing is logged. If I remove it then it starts to log 
> again, but without async.
>
> Is there any change I'm missing regarding this async logging when moving to 
> these new versions of tomcat, java and log4j?

Can you test with
`-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.BasicAsyncLoggerContextSelector`
since `Log4jContextSelector` is deprecated since 2.10?

Although it should have no influence on the context selector, if you were using 
`log4j-web`, did you switch to `log4j-jakarta-web`?

Piotr

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




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