logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "billokara@gmail.com"<billok...@gmail.com>
Subject Re: ConfigLocationUri jndi vs file
Date Tue, 26 Sep 2017 21:07:46 GMT


On 2017-09-26 12:11, "billokara@gmail.com"<billokara@gmail.com> wrote: 
> Hi,
> 
> Using log4j2 v2.3 (and also tested with v2.9.1), when deploying a war with the following
config in servlet 3.0 web.xml file:
> 
>   <context-param>
>     <description>log4j2 configuration file</description>
>     <param-name>log4jConfiguration</param-name>
>     <param-value>WEB-INF/classes/log4j2.xml</param-value>
>   </context-param>
> 
> 
> when tried to monitor the logger via JMX, noticed that the 
> ConfigLocationUri=jndi:/localhost/myapp/WEB-INF/classes/log4j2.xml
> instead of 
> ConfigLocationUri=file:///home/tomcat/webapps/myapp/WEB-INF/classes/log4j2.xml
> 
> The current issue we're seeing now is that the runtime modifying of the log4j2.xml logger
level didn't seem to work even with setting in log4j2.xml
> <Configuration monitorInterval="10" status="warn" verbose="true">
> 
> With log4j2 v2.3 jmx, also noticed that the jndi is using DefaultConfigMonitor class
vs the file:/// one is using FileConfigMonitor class
> 
> So my question is:
> - does the config monitorInterval only works if it's using file:// in ConfigLocationUri?
> - if yes, how to config to use file:/// instead of jndi: in the ConfigLocationUri?
> 
> thanks!
> Bill
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> I think I figured out the issue, seems related to the log4jConfiguration setting...

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


Mime
View raw message