Hi, sorry to ask again, but auto-configuration is not working.. Here is the 
configuration and the debug log, plz any idea what is wrong?Enric


log4j-1.2-api-2.10.0.jar     
log4j-api-2.10.0.jar         
log4j-core-2.10.0.jar        
log4j-iostreams-2.10.0.jar   
log4j-jcl-2.10.0.jar         
log4j-jul-2.10.0.jar         
log4j-slf4j-impl-2.10.0.jar  
log4j-taglib-2.10.0.jar      
log4j-web-2.10.0.jar



web.xml:

    <context-param>
        <param-name>log4jConfiguration</param-name>
        <param-value>file:///home/enric/log4j2.xml</param-value>
    </context-param>
    <context-param>
        <param-name>log4jRefreshInterval</param-name>
        <param-value>3000</param-value>
    </context-param>


log4j2.xml:

<Configuration monitoringInterval="5">

log:

2017-12-10 21:50:13,067 localhost-startStop-1 DEBUG Configuration 
XmlConfiguration[location=/home/enric/log4j2.xml] initialized
2017-12-10 21:50:13,067 localhost-startStop-1 DEBUG Starting configuration 
XmlConfiguration[location=/home/enric/log4j2.xml]
2017-12-10 21:50:13,067 localhost-startStop-1 DEBUG Started configuration 
XmlConfiguration[location=/home/enric/log4j2.xml] OK.
2017-12-10 21:50:13,068 localhost-startStop-1 TRACE Stopping 
org.apache.logging.log4j.core.config.DefaultConfiguration@33036b7f...
2017-12-10 21:50:13,068 localhost-startStop-1 TRACE DefaultConfiguration 
notified 1 ReliabilityStrategies that config will be stopped.
2017-12-10 21:50:13,068 localhost-startStop-1 TRACE DefaultConfiguration 
stopping root LoggerConfig.
2017-12-10 21:50:13,068 localhost-startStop-1 TRACE DefaultConfiguration 
notifying ReliabilityStrategies that appenders will be stopped.
2017-12-10 21:50:13,069 localhost-startStop-1 TRACE DefaultConfiguration 
stopping remaining Appenders.
2017-12-10 21:50:13,069 localhost-startStop-1 DEBUG Shutting down 
OutputStreamManager SYSTEM_OUT.false.false-2
2017-12-10 21:50:13,069 localhost-startStop-1 DEBUG Shut down 
OutputStreamManager SYSTEM_OUT.false.false-2, all resources released: true
2017-12-10 21:50:13,070 localhost-startStop-1 DEBUG Appender DefaultConsole-2 
stopped with status true
2017-12-10 21:50:13,071 localhost-startStop-1 TRACE DefaultConfiguration 
stopped 1 remaining Appenders.
2017-12-10 21:50:13,071 localhost-startStop-1 TRACE DefaultConfiguration 
cleaning Appenders from 1 LoggerConfigs.
2017-12-10 21:50:13,071 localhost-startStop-1 DEBUG Stopped 
org.apache.logging.log4j.core.config.DefaultConfiguration@33036b7f OK
2017-12-10 21:50:13,072 localhost-startStop-1 TRACE Reregistering MBeans after 
reconfigure. 
Selector=org.apache.logging.log4j.core.selector.ClassLoaderContextSelector@4686f666
2017-12-10 21:50:13,072 localhost-startStop-1 TRACE Reregistering context 
(1/1): '29921d8b' org.apache.logging.log4j.core.LoggerContext@c7e92e7
2017-12-10 21:50:13,073 localhost-startStop-1 TRACE Unregistering 1 MBeans: 
[org.apache.logging.log4j2:type=29921d8b]
2017-12-10 21:50:13,074 localhost-startStop-1 TRACE Unregistering 1 MBeans: 
[org.apache.logging.log4j2:type=29921d8b,component=StatusLogger]
2017-12-10 21:50:13,074 localhost-startStop-1 TRACE Unregistering 1 MBeans: 
[org.apache.logging.log4j2:type=29921d8b,component=ContextSelector]
2017-12-10 21:50:13,075 localhost-startStop-1 TRACE Unregistering but no MBeans 
found matching 
'org.apache.logging.log4j2:type=29921d8b,component=Loggers,name=*'
2017-12-10 21:50:13,075 localhost-startStop-1 TRACE Unregistering 1 MBeans: 
[org.apache.logging.log4j2:type=29921d8b,component=Appenders,name=DefaultConsole-2]
2017-12-10 21:50:13,076 localhost-startStop-1 TRACE Unregistering but no MBeans 
found matching 
'org.apache.logging.log4j2:type=29921d8b,component=AsyncAppenders,name=*'
2017-12-10 21:50:13,076 localhost-startStop-1 TRACE Unregistering but no MBeans 
found matching 
'org.apache.logging.log4j2:type=29921d8b,component=AsyncLoggerRingBuffer'
2017-12-10 21:50:13,076 localhost-startStop-1 TRACE Unregistering but no MBeans 
found matching 
'org.apache.logging.log4j2:type=29921d8b,component=Loggers,name=*,subtype=RingBuffer'
2017-12-10 21:50:13,077 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b
2017-12-10 21:50:13,077 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=StatusLogger
2017-12-10 21:50:13,078 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=ContextSelector
2017-12-10 21:50:13,079 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Loggers,name=
2017-12-10 21:50:13,080 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Loggers,name=org.springframework.beans
2017-12-10 21:50:13,080 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Loggers,name=com.thepeachbeetle.common.http.HttpRequester
2017-12-10 21:50:13,080 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Loggers,name=org.directwebremoting
2017-12-10 21:50:13,080 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Loggers,name=org.hibernate
2017-12-10 21:50:13,081 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Loggers,name=org.springframework.web
2017-12-10 21:50:13,083 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Loggers,name=org.apache.http
2017-12-10 21:50:13,083 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Loggers,name=com.thepeachbeetle
2017-12-10 21:50:13,084 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Loggers,name=org.springframework.social.connect.web.ProviderSignInController
2017-12-10 21:50:13,086 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Loggers,name=org.quartz.core
2017-12-10 21:50:13,088 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Loggers,name=org.springframework
2017-12-10 21:50:13,088 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Loggers,name=com.thepeachbeetle.services.networks.client
2017-12-10 21:50:13,089 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Appenders,name=FRAMEWORK
2017-12-10 21:50:13,089 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Appenders,name=STDOUT
2017-12-10 21:50:13,090 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Appenders,name=PROJECT
2017-12-10 21:50:13,090 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Appenders,name=API
2017-12-10 21:50:13,091 localhost-startStop-1 DEBUG Registering MBean 
org.apache.logging.log4j2:type=29921d8b,component=Appenders,name=MAIL
2017-12-10 21:50:13,091 localhost-startStop-1 TRACE Using DummyNanoClock for 
nanosecond timestamps.
2017-12-10 21:50:13,091 localhost-startStop-1 DEBUG Reconfiguration complete 
for context[name=29921d8b] at URI /home/enric/log4j2.xml 
(org.apache.logging.log4j.core.LoggerContext@c7e92e7) with optional 
ClassLoader: null
10-Dec-2017 21:50:13.305 INFO [localhost-startStop-1] 
org.apache.catalina.core.ApplicationContext.log Initializing Spring root 
WebApplicationContext
2017-12-10 21:50:13,315 localhost-startStop-1 DEBUG 
AsyncLogger.ThreadNameStrategy=UNCACHED (user specified null, default is 
UNCACHED)
2017-12-10 21:50:13,315 localhost-startStop-1 TRACE Using default SystemClock 
for timestamps.
2017-12-10 21:50:58,343 localhost-startStop-1 DEBUG Log4jServletContextListener 
ensuring that Log4j starts up properly.
2017-12-10 21:50:58,377 localhost-startStop-1 DEBUG Log4jServletFilter 
initialized.
10-Dec-2017 21:50:58.446 INFO [localhost-startStop-1] 
org.apache.catalina.core.ApplicationContext.log 
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)


    En lunes, 4 de diciembre de 2017 9:28:40 GMT, Enric Jaen 
<enricj...@yahoo.es.INVALID> escribió:  
 
 I removed Log4j-1.2.14 and now autoreload works fine:


04-Dec-2017 09:22:58.487 INFO [localhost-startStop-1] 
org.apache.catalina.core.ApplicationContext.log 
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)

Thanks to all !
Best regards
Enric

    En domingo, 3 de diciembre de 2017 23:07:54 GMT, Remko Popma 
<remko.po...@gmail.com> escribió:  
 
 Enric,

You should be able to remove Log4j-1.2.14 after adding log4j-1.2-api-2.6.2.jar 
(or log4j-1.2-api-2.4.jar). 
They provide the same API to the application. 

The difference is that log4j-1.2-api-2.x.jar uses log4j-core-2.x as its 
implementation, which is what you want. 

(Shameless plug) Every java main() method deserves http://picocli.info

> On Dec 4, 2017, at 7:34, Enric Jaen <enricj...@yahoo.es.INVALID> wrote:
> 
> i cannot remove log4j-1.2 because we depend on 3rd lib that uses them. That's 
> why we have bridge to log4j2. I downgraded all to 2.4 but not working 
> autoreload. 
> 
> Enric
> 
>    En domingo, 3 de diciembre de 2017 16:24:23 GMT, Mikael Ståldal 
><mi...@apache.org> escribió:  
> 
> First, remove log4j-1.2.14.jar from classpath.
> 
> Then make sure you use the same version of all Log4J 2.x jars, now you 
> are mixing 2.4 with 2.6.2.
> 
> 
>> On 2017-12-03 17:07, Enric Jaen wrote:
>> log4j2 is working fine, but not the auto reload. I have tried several 
>> configurations but none has worked. This is the latest I tried:
>> 
>> *** log4j2.xml :
>> <Configuration status="trace" monitoringInterval="5">
>> 
>> 
>> *** web.xml (sevlet 3.0)<context-param>
>>      <param-name>log4jConfiguration</param-name>
>>      <param-value>file:///tmp/log4j2.xml</param-value>
>> </context-param>
>> 
>> <context-param>
>>        <param-name>log4j.refresh.interval</param-name>
>>        <param-value>5</param-value>
>> </context-param>
>> 
>>      <listener>
>>          <listener-class>
>>              org.apache.logging.log4j.web.Log4jServletContextListener
>>          </listener-class>
>>      </listener>
>> 
>> 
>> **** jars deployed:
>> log4j-1.2.14.jar                  log4j-iostreams-2.4.jar          
>> log4j-taglib-2.4.jarlog4j-1.2-api-2.6.2.jar  log4j-jcl-2.6.2.jar      
>> log4j-web-2.6.2.jarlog4j-api-2.6.2.jarlog4j-jul-2.4.jar                
>> log4j-core-2.6.2.jar              log4j-slf4j-impl-2.4.jar
>> 
>> Please any suggestion ?
> 
> ---------------------------------------------------------------------
> 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