Hello,

I have checked the debug log using '-Dlog4j2.contextSelector' (that does not 
log) with the debug log without using this variable.

I can't see any differences, except obviously the messages regarding async 
contexts:

Async:
TRACE StatusLogger [AsyncContext@4857245] AsyncLoggerDisruptor creating new 
disruptor for this context.
DEBUG StatusLogger No AsyncWaitStrategyFactory was configured in the 
configuration, using default factory...
TRACE StatusLogger DefaultAsyncWaitStrategyFactory property 
AsyncLogger.WaitStrategy=TIMEOUT
TRACE StatusLogger DefaultAsyncWaitStrategyFactory creating 
TimeoutBlockingWaitStrategy(timeout=10, unit=MILLIS)
TRACE StatusLogger Log4jLoggerFactory.getContext() found anchor class 
org.mariadb.jdbc.util.log.Loggers$Slf4JLoggerFactory
TRACE StatusLogger [AsyncContext@4857245] AsyncLoggerDisruptor not starting new 
disruptor for this context, using existing object.
DEBUG StatusLogger Starting LoggerContext[name=AsyncContext@4857245, 
org.apache.logging.log4j.core.async.AsyncLoggerContext@70f14ed7]...
DEBUG StatusLogger Reconfiguration started for 
context[name=AsyncContext@4857245] at URI null 
(org.apache.logging.log4j.core.async.AsyncLoggerContext@70f14ed7) with optional 
ClassLoader: null

No Async:
DEBUG StatusLogger Starting LoggerContext[name=55494dde, 
org.apache.logging.log4j.core.LoggerContext@35c5ff53]...
DEBUG StatusLogger Reconfiguration started for context[name=55494dde] at URI 
null (org.apache.logging.log4j.core.LoggerContext@35c5ff53) with optional 
ClassLoader: null


Async:
DEBUG StatusLogger Stopped 
org.apache.logging.log4j.core.config.DefaultConfiguration@70f19d15 OK
TRACE StatusLogger Reregistering MBeans after reconfigure. 
Selector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector@788c3bad
TRACE StatusLogger Reregistering context (1/1): 'AsyncContext@4857245' 
org.apache.logging.log4j.core.async.AsyncLoggerContext@70f14ed7
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=AsyncContext@4857245'
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=AsyncContext@4857245,component=StatusLogger'
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=AsyncContext@4857245,component=ContextSelector'
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=AsyncContext@4857245,component=Loggers,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=AsyncContext@4857245,component=Appenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=AsyncContext@4857245,component=AsyncAppenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=AsyncContext@4857245,component=AsyncLoggerRingBuffer'
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=AsyncContext@4857245,component=Loggers,name=*,subtype=RingBuffer'
DEBUG StatusLogger Registering MBean 
org.apache.logging.log4j2:type=AsyncContext@4857245
DEBUG StatusLogger Registering MBean 
org.apache.logging.log4j2:type=AsyncContext@4857245,component=AsyncLoggerRingBuffer
DEBUG StatusLogger Registering MBean 
org.apache.logging.log4j2:type=AsyncContext@4857245,component=StatusLogger
DEBUG StatusLogger Registering MBean 
org.apache.logging.log4j2:type=AsyncContext@4857245,component=ContextSelector
DEBUG StatusLogger Registering MBean 
org.apache.logging.log4j2:type=AsyncContext@4857245,component=Appenders,name=DefaultConsole-2

No async:
DEBUG StatusLogger Stopped 
org.apache.logging.log4j.core.config.DefaultConfiguration@35c5ff76 OK
TRACE StatusLogger Reregistering MBeans after reconfigure. 
Selector=org.apache.logging.log4j.core.selector.ClassLoaderContextSelector@4274e977
TRACE StatusLogger Reregistering context (1/1): '55494dde' 
org.apache.logging.log4j.core.LoggerContext@35c5ff53
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=55494dde'
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=55494dde,component=StatusLogger'
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=55494dde,component=ContextSelector'
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=55494dde,component=Loggers,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=55494dde,component=Appenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=55494dde,component=AsyncAppenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=55494dde,component=AsyncLoggerRingBuffer'
TRACE StatusLogger Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=55494dde,component=Loggers,name=*,subtype=RingBuffer'
DEBUG StatusLogger Registering MBean org.apache.logging.log4j2:type=55494dde
DEBUG StatusLogger Registering MBean 
org.apache.logging.log4j2:type=55494dde,component=StatusLogger
DEBUG StatusLogger Registering MBean 
org.apache.logging.log4j2:type=55494dde,component=ContextSelector
DEBUG StatusLogger Registering MBean 
org.apache.logging.log4j2:type=55494dde,component=Appenders,name=DefaultConsole-2

Joan.

-----Original Message-----
From: joan.balagu...@ventusproxy.com <joan.balagu...@ventusproxy.com> 
Sent: Thursday, January 25, 2024 1:56 PM
To: 'Log4J Users List' <log4j-user@logging.apache.org>
Subject: RE: Async logger not logging after upgrading tomcat, jdk and log4j

Hello,

Here is the trace when starting tomcat with 
'-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector':
https://gist.github.com/joanbalaguero/1fa286417bfc9dbd3ce75e043bd26f3d

It seems the async contexts are started, but maybe someone can see something 
wrong that makes the log does not work.

Thanks,

Joan.



---------------------------------------------------------------------
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

Reply via email to