You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by ajaeger <An...@opentext.com> on 2013/04/25 09:21:01 UTC
Logging configuration in TomEE 1.6.0 with commons-logging and log4j
using webapps and ear
Hello,
we need some advice regarding logging configuration in TomEE 1.6.0-Snapshot
20130417 with commons-logging and log4j.
We asked a similar questions in January for TomEE 1.5.1 which were solved
with TomEE 1.5.2.
Meanwhile we moved on to TomEE 1.6.0 and deploy an additional EAR together
with our webapps.
- each application (webapp or ear) should have its own log file
- each application should be configured separately with an application
specific log4j.xml
- some classes are contained in multiple application but should only log in
one application if configured
Multiple webapps:
commons-logging-1.1.1.jar, log4j-1.2.17.jar and log4j.xml are contained in
each <TomEE_HOME>/webapp/HelloWorld/WEB-INF/lib.
Single ear:
commons-logging-1.1.1.jar, log4j-1.2.17.jar and log4j.xml are contained in
each <TomEE_HOME>/apps/HelloWorld/HelloWorld/WEB-INF/lib.
In this configuration the logging for the webapps work like expected, but
the logging for the ear is not initialized.
If we remove commons-logging-1.1.1.jar from <TomEE_HOME>/lib than the
logging for the webapps and the ear works like expected.
But that will break the logging from openJPA.
If we add log4j-1.2.17.jar additionally to commons-logging-1.1.1.jar to
<TomEE_HOME>/lib then the application that is started at last overwrites the
logging for all application.
How must we configure TomEE to support our scenario?
I can provide a small sample that reproduces our issue.
Thanks in advance for your help
Andreas
--
View this message in context: http://openejb.979440.n4.nabble.com/Logging-configuration-in-TomEE-1-6-0-with-commons-logging-and-log4j-using-webapps-and-ear-tp4662445.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Logging configuration in TomEE 1.6.0 with commons-logging and
log4j using webapps and ear
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi
providing a sample will be more clear (at least fo rme ;)
would be great if it could log "this message should have this format {the
message}" or sthg like it to show it doesn't work
PS: do you use use_tccl property of commons logging?
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*
2013/4/25 ajaeger <An...@opentext.com>
> Hello,
>
> we need some advice regarding logging configuration in TomEE 1.6.0-Snapshot
> 20130417 with commons-logging and log4j.
> We asked a similar questions in January for TomEE 1.5.1 which were solved
> with TomEE 1.5.2.
>
> Meanwhile we moved on to TomEE 1.6.0 and deploy an additional EAR together
> with our webapps.
> - each application (webapp or ear) should have its own log file
> - each application should be configured separately with an application
> specific log4j.xml
> - some classes are contained in multiple application but should only log in
> one application if configured
> Multiple webapps:
> commons-logging-1.1.1.jar, log4j-1.2.17.jar and log4j.xml are contained in
> each <TomEE_HOME>/webapp/HelloWorld/WEB-INF/lib.
>
> Single ear:
> commons-logging-1.1.1.jar, log4j-1.2.17.jar and log4j.xml are contained in
> each <TomEE_HOME>/apps/HelloWorld/HelloWorld/WEB-INF/lib.
>
> In this configuration the logging for the webapps work like expected, but
> the logging for the ear is not initialized.
>
> If we remove commons-logging-1.1.1.jar from <TomEE_HOME>/lib than the
> logging for the webapps and the ear works like expected.
> But that will break the logging from openJPA.
>
> If we add log4j-1.2.17.jar additionally to commons-logging-1.1.1.jar to
> <TomEE_HOME>/lib then the application that is started at last overwrites
> the
> logging for all application.
>
> How must we configure TomEE to support our scenario?
> I can provide a small sample that reproduces our issue.
>
> Thanks in advance for your help
> Andreas
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Logging-configuration-in-TomEE-1-6-0-with-commons-logging-and-log4j-using-webapps-and-ear-tp4662445.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>