You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Robin Jansohn <sn...@web.de> on 2015/03/04 13:30:01 UTC

Parameter isLog4jAutoInitializationDisabled ignored when used alongside log4jConfiguration?

I have a working project to load an external log4j2.xml configuration file in
my webapp. But when I set the context parameter
'isLog4jAutoInitializationDisabled' to disable automatic initialization,
this parameter seems to be ignored. The debug loading messages from log4j2
appear directly after startup and not only while receiving the first
webservice request:


Here's my web.xml:


myWebservice_log4j2.xml:


Is this designed behavior, a mistake in my configuration or a bug?



--
View this message in context: http://apache-logging.6191.n7.nabble.com/Parameter-isLog4jAutoInitializationDisabled-ignored-when-used-alongside-log4jConfiguration-tp54034.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

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


Re: Parameter isLog4jAutoInitializationDisabled ignored when used alongside log4jConfiguration?

Posted by Gary Gregory <ga...@gmail.com>.
Did you get you configuration to work?

Gary

On Fri, Jun 26, 2015 at 1:57 AM, Gary Gregory <ga...@gmail.com>
wrote:

> OK, so we can rule out the obvious Tomcat 7.0.43 issue mentioned on
> https://logging.apache.org/log4j/2.x/manual/webapp.html
>
> Gary
>
> On Fri, Jun 26, 2015 at 1:17 AM, Robin Jansohn <sn...@web.de> wrote:
>
>> Starting Servlet Engine: Apache Tomcat/7.0.47
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-logging.6191.n7.nabble.com/Parameter-isLog4jAutoInitializationDisabled-ignored-when-used-alongside-log4jConfiguration-tp54034p55867.html
>> Sent from the Log4j - Users mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Parameter isLog4jAutoInitializationDisabled ignored when used alongside log4jConfiguration?

Posted by Gary Gregory <ga...@gmail.com>.
OK, so we can rule out the obvious Tomcat 7.0.43 issue mentioned on
https://logging.apache.org/log4j/2.x/manual/webapp.html

Gary

On Fri, Jun 26, 2015 at 1:17 AM, Robin Jansohn <sn...@web.de> wrote:

> Starting Servlet Engine: Apache Tomcat/7.0.47
>
>
>
> --
> View this message in context:
> http://apache-logging.6191.n7.nabble.com/Parameter-isLog4jAutoInitializationDisabled-ignored-when-used-alongside-log4jConfiguration-tp54034p55867.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Parameter isLog4jAutoInitializationDisabled ignored when used alongside log4jConfiguration?

Posted by Robin Jansohn <sn...@web.de>.
Starting Servlet Engine: Apache Tomcat/7.0.47



--
View this message in context: http://apache-logging.6191.n7.nabble.com/Parameter-isLog4jAutoInitializationDisabled-ignored-when-used-alongside-log4jConfiguration-tp54034p55867.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

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


Re: Parameter isLog4jAutoInitializationDisabled ignored when used alongside log4jConfiguration?

Posted by Gary Gregory <ga...@gmail.com>.
What is your web container and its version?

Gary

On Thu, Jun 25, 2015 at 11:18 PM, Robin Jansohn <sn...@web.de> wrote:

> web.xml: http://pastebin.com/MxtGTnfX
> log4j2.xml: http://pastebin.com/6D3ChGbY
>
>
>
> --
> View this message in context:
> http://apache-logging.6191.n7.nabble.com/Parameter-isLog4jAutoInitializationDisabled-ignored-when-used-alongside-log4jConfiguration-tp54034p55862.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Parameter isLog4jAutoInitializationDisabled ignored when used alongside log4jConfiguration?

Posted by Robin Jansohn <sn...@web.de>.
web.xml: http://pastebin.com/MxtGTnfX
log4j2.xml: http://pastebin.com/6D3ChGbY



--
View this message in context: http://apache-logging.6191.n7.nabble.com/Parameter-isLog4jAutoInitializationDisabled-ignored-when-used-alongside-log4jConfiguration-tp54034p55862.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

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


Re: Parameter isLog4jAutoInitializationDisabled ignored when used alongside log4jConfiguration?

Posted by Gary Gregory <ga...@gmail.com>.
Your config file did not come through. You place it on pastebin perhaps.

Gary

On Wed, Mar 4, 2015 at 4:30 AM, Robin Jansohn <sn...@web.de> wrote:

> I have a working project to load an external log4j2.xml configuration file
> in
> my webapp. But when I set the context parameter
> 'isLog4jAutoInitializationDisabled' to disable automatic initialization,
> this parameter seems to be ignored. The debug loading messages from log4j2
> appear directly after startup and not only while receiving the first
> webservice request:
>
>
> Here's my web.xml:
>
>
> myWebservice_log4j2.xml:
>
>
> Is this designed behavior, a mistake in my configuration or a bug?
>
>
>
> --
> View this message in context:
> http://apache-logging.6191.n7.nabble.com/Parameter-isLog4jAutoInitializationDisabled-ignored-when-used-alongside-log4jConfiguration-tp54034.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory