Using BasicContextSelector in OSGI application

2018-09-28 Thread Rob Gansevles
Hi, I would like to use the BasicContextSelector in our OSGI application so have a single global log4j connfiguration as described in http://logging.apache.org/log4j/2.x/manual/logsep.html However, BasicContextSelector lives in package org.apache.logging.log4j.core.selector which does not seem

RE: Flush in RollingRandomAccessFile

2018-09-28 Thread Joan Balagueró - ventusproxy
Hello, The jars we have in our app are: log4j-1.2-api-2.11.1.jar, log4j-api-2.11.1.jar, log4j-core-2.11.1.jar and log4j-web-2.11.1.jar. Are the right jars, or may I add something else? Thanks, Joan. -Mensaje original- De: Joan Balagueró - ventusproxy

Re: Flush in RollingRandomAccessFile

2018-09-28 Thread Ralph Goers
That all sounds correct to me. I would suggest you add status=“DEBUG” to the configuration element in your log4j2.xml and see what happens during shutdown. Ralph > On Sep 28, 2018, at 8:57 AM, Joan Balagueró - ventusproxy > wrote: > > Hello, > > The jars we have in our app are:

Re: Using BasicContextSelector in OSGI application

2018-09-28 Thread Ralph Goers
All ContextSelectors are part of log4j-core, not log4j-api. Ralph > On Sep 28, 2018, at 7:59 AM, Rob Gansevles wrote: > > Hi, > > I would like to use the BasicContextSelector in our OSGI application so > have a single global log4j connfiguration as described in >

Re: Flush in RollingRandomAccessFile

2018-09-28 Thread Ralph Goers
1. The relevant appenders are listed below? If so, they are stopping correctly. Are they asynchronous? Can you provide the log4j2.xml? 2. I think the failure to shutdown the thread has been reported. It wouldn’t be causing your problem though. Ralph > On Sep 28, 2018, at 9:17 AM, Joan

RV: Flush in RollingRandomAccessFile

2018-09-28 Thread Joan Balagueró - ventusproxy
Hi Ralph, I think that adding -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector to make all loggers asynchronous has solved this problem. Thanks, Joan. -Mensaje original- De: Ralph Goers [mailto:ralph.go...@dslextreme.com] Enviado el: viernes, 28

RE: Flush in RollingRandomAccessFile

2018-09-28 Thread Joan Balagueró - ventusproxy
Hi Ralph, Below the trace when tomcat is stopped: 28-Sep-2018 18:14:36.251 INFORMACIÓN [main] org.apache.catalina.core.StandardServer.await Se ha recibido un comando de apagado a través del puerto de apagado. Parando la instancia del Servidor. 28-Sep-2018 18:14:36.252 INFORMACIÓN [main]

Re: Using BasicContextSelector in OSGI application

2018-09-28 Thread Rob Gansevles
Yes, that makes sense, but it seems they are still loaded by the log4j-api. I guess this is the reason there are a few optional import-package declarations in the manifest-generation in the pom for log4j-api: org.apache.felix maven-bundle-plugin

Re: Using BasicContextSelector in OSGI application

2018-09-28 Thread Ralph Goers
It sounds related to LOG4J2-920 but the solution provided there has to be incorrect. There is no way the Log4j API should be declaring any requirements on Log4j Core stuff, especially since the Log4j API doesn’t have a clue what a ContextSelector is. That is only use by the Log4jContextFactory.

Re: Using BasicContextSelector in OSGI application

2018-09-28 Thread Ralph Goers
Despite what I said below, it seems that the patch for LOG4J2-920 was applied over 2 years ago so this should not be happening with 2.11.1. Ralph > On Sep 28, 2018, at 10:34 AM, Ralph Goers wrote: > > It sounds related to LOG4J2-920 but the solution provided there has to be > incorrect.