You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Guy Katz <gk...@allot.com> on 2004/04/14 18:41:13 UTC

commons-logging in J2EE environment

hi all;
I just recently started working with the common-logging.
I am using JBOSS app server.
it seems I have 2 choices configuring my logging mechanism for my
application:
1. adding my configuration to the log4j.xml already existing in the JBOSS
directory.
2. put a system property with the -Dlog4j... with my file name and than
loose the JBOSS configuration (or add it to my file)
both method dont seem very good to me cause i dont want to merge JBoss
configuration and my configuration.
I am looking to know if there is a 3rd way which is using common-logging and
have 2 different log4j.xml files such that my enterprise application will
use my xml configuration and JBoss will use his.
can I achieve this?
i think with log4j i could have used the DOMConfigurator to load my
configuration as well. did i loose this ability using commons-logging?
thanks for the help.

____________________
Guy Katz
Allot Communications
gkatz@allot.com
tel: +972 9 7619288
fax: +972 9 7443626


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


Re: commons-logging in J2EE environment

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
hi guy

commons-logging doesn't really configure the logging system (log4j in 
this case), the commons-logging configuration just chooses the logging 
system to be used. therefore, i think that the log4j configuration 
should be transparent (in other words, the same whether you call log4j 
directly or through commons-logging).

i hope that this answers your question.

- robert

On 14 Apr 2004, at 17:41, Guy Katz wrote:

> hi all;
> I just recently started working with the common-logging.
> I am using JBOSS app server.
> it seems I have 2 choices configuring my logging mechanism for my
> application:
> 1. adding my configuration to the log4j.xml already existing in the 
> JBOSS
> directory.
> 2. put a system property with the -Dlog4j... with my file name and than
> loose the JBOSS configuration (or add it to my file)
> both method dont seem very good to me cause i dont want to merge JBoss
> configuration and my configuration.
> I am looking to know if there is a 3rd way which is using 
> common-logging and
> have 2 different log4j.xml files such that my enterprise application 
> will
> use my xml configuration and JBoss will use his.
> can I achieve this?
> i think with log4j i could have used the DOMConfigurator to load my
> configuration as well. did i loose this ability using commons-logging?
> thanks for the help.
>
> ____________________
> Guy Katz
> Allot Communications
> gkatz@allot.com
> tel: +972 9 7619288
> fax: +972 9 7443626
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


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