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 Joerg Eggink <eg...@access-sys-eu.com> on 2003/07/08 10:09:44 UTC

DOMconfigurator for Web applications

Dear all

I want to use the Default Initialization under Tomcat using the
following command.
export TOMCAT_OPTS="-Dlog4j.debug -Dlog4j.configuration=log4j.xml"

Which filename do I have to specify in the DOMconfigurator if the xml
file is in WEB-INF/classes ?

DOMConfigurator.configure (???????);

Thanks in advance for the help.

Kind Regards

Joerg


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


RE: DOMconfigurator for Web applications

Posted by Joerg Eggink <eg...@access-sys-eu.com>.
Dear Jake

That’s it !!! It´s working fine. 
Thank you very much.

> That is done automatically by Log4j.

I didn’t expect such intelligent in log4j
Again some thanks to the developer.

Best Regards

Joerg


> -----Original Message-----
> From: Jacob Kjome [mailto:hoju@visi.com] 
> Sent: Tuesday, July 08, 2003 3:51 PM
> To: Log4J Users List
> Subject: Re: DOMconfigurator for Web applications
> 
> 
> 
> You seem to be making two contradicting statements...
> 
> 1.  "I want to use the Default Initialization ..."
> 
> 2.  "Which filename do I have to specify in the DOMconfigurator ..."
> 
> Basically, if you want #1, then you don't perform #2 
> yourself.  That is 
> done automatically by Log4j.  Additionally, don't add 
> -Dlog4j.configuration 
> to the command line if you want to load the configuration from 
> WEB-INF/classes.  Log4j will automatically find "log4j.xml" or 
> "log4j.properties" if it exists in the classpath.  Make sure 
> you also have 
> a copy of log4j.jar in each webapp's WEB-INF/lib, BTW.  If 
> you do provide 
> this command line option, then provide a valid URL file path to the 
> confguration file such as file:///C:/java/log4j/config/log4j.xml .
> 
> Jake
> 
> At 10:09 AM 7/8/2003 +0200, you wrote:
> >Dear all
> >
> >I want to use the Default Initialization under Tomcat using the 
> >following command. export TOMCAT_OPTS="-Dlog4j.debug 
> >-Dlog4j.configuration=log4j.xml"
> >
> >Which filename do I have to specify in the DOMconfigurator 
> if the xml 
> >file is in WEB-INF/classes ?
> >
> >DOMConfigurator.configure (???????);
> >
> >Thanks in advance for the help.
> >
> >Kind Regards
> >
> >Joerg
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 
> 


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


Re: DOMconfigurator for Web applications

Posted by Jacob Kjome <ho...@visi.com>.
You seem to be making two contradicting statements...

1.  "I want to use the Default Initialization ..."

2.  "Which filename do I have to specify in the DOMconfigurator ..."

Basically, if you want #1, then you don't perform #2 yourself.  That is 
done automatically by Log4j.  Additionally, don't add -Dlog4j.configuration 
to the command line if you want to load the configuration from 
WEB-INF/classes.  Log4j will automatically find "log4j.xml" or 
"log4j.properties" if it exists in the classpath.  Make sure you also have 
a copy of log4j.jar in each webapp's WEB-INF/lib, BTW.  If you do provide 
this command line option, then provide a valid URL file path to the 
confguration file such as file:///C:/java/log4j/config/log4j.xml .

Jake

At 10:09 AM 7/8/2003 +0200, you wrote:
>Dear all
>
>I want to use the Default Initialization under Tomcat using the
>following command.
>export TOMCAT_OPTS="-Dlog4j.debug -Dlog4j.configuration=log4j.xml"
>
>Which filename do I have to specify in the DOMconfigurator if the xml
>file is in WEB-INF/classes ?
>
>DOMConfigurator.configure (???????);
>
>Thanks in advance for the help.
>
>Kind Regards
>
>Joerg
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org


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