tks
i'm sorry but where can i find the log file ?

my logj4.properties in WEB-INF/classes:
log4j.rootCategory=DEBUG, htmlFile
log4j.appender.htmlFile.layout=org.apache.log4j.HTMLLayout
log4j.appender.htmlFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.htmlFile.DatePattern='.'yyyy-MM-dd
log4j.appender.htmlFile.File=myapp-log.html

for a test in a jsp, i put these lines :

Category log = Category.getInstance("LOG");
PropertyConfigurator.configure("log4j.properties");
log.info("log sentence");

it's executed but no file created.

tks

----- Original Message -----
From: "Dan Lipofsky" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, October 01, 2002 12:30 PM
Subject: Re: log4j


> You have to call PropertyConfigurator.configure().
> I have a JSP which gets run when tomcat starts.
> It has a jspInit() method which calls an init class
> I wrote which initializes log4j like this:
>
>         URL url = Init.class.getResource(filename);
>         PropertyConfigurator.configure(url);
>
> To get tomcat to run the JSP at startup I have this in
> my web.xml
>
> <web-app>
>   <servlet>
>     <servlet-name>/Startup.jsp</servlet-name>
>     <jsp-file>/Startup.jsp</jsp-file>
>     <load-on-startup>1</load-on-startup>
>   </servlet>
>
>   ...
>
> </web-app>
>
> - Dan
>
> ----- Original Message -----
> From: "Maxime Colas des Francs" <[EMAIL PROTECTED]>
> Sent: Tuesday, October 01, 2002 9:08 AM
>
> How to use log4j with a tomcat application ?
>
> I put the log4j.properties in WEB-INF/classes
> No error but no file created (certainly rights ?)
>
> Can i put some log in a directory of the webapp ?
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to