The short log4j tutorial on the log4j website ( http://logging.apache.org/log4j/docs/manual.html ) should give you a quick primer on configuring log4j for a specific log file.
On the issue at hand, having a copy of log4j in each tomcat context insures that there are two independent stances of log4j, one in each context. You just need to create a configuration file for each as if it was a standalone app, and don't worry about the other. On 2/27/06, julie gautier <[EMAIL PROTECTED]> wrote: > > I know my questions are probably stupid (I'm don't know anything to log4j) > but I actually use log4j without configuration file. Do I have to have a > lo4j.properties and a log4j.xml files ? Does someone have an example of > such configuration files in the aim of having log files depending on the > context (one per application) ? > Thanks again... and sorry for those (too simple and annoying) questions. > > Javier Gonzalez <[EMAIL PROTECTED]> a écrit : > Easiest way: include a copy of log4j.jar in each of the web apps' > WEB-INF/lib folder. Include a separate log4j configuration file in each > WEB-INF/classes (or modify each app to configure log4j in each). > > On 2/27/06, julie gautier wrote: > > > > Hi all, > > I use Tomcat to deploy two web applications. Actually, all the traces > > are written to a single file (stdout.log) under the Tomcat log > directory. > > How can I do to write the traces to different log files : app1.out and > > app2.out for instance. > > Could you please send me an example ? > > Thanks to help me. > > > > > > > > --------------------------------- > > Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les > > tarifs exceptionnels pour appeler la France et l' > international.Téléchargezla version beta. > > > > > > -- > Javier González Nicolini > > > > --------------------------------- > Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les > tarifs exceptionnels pour appeler la France et l'international.Téléchargezla > version beta. > -- Javier González Nicolini
