<param name="File"   value="folder/workshop_test.log" />
should do the trick (slash instead of '.'). Log4j does not create folders if 
they do not exist. So must assure this folder exists before initializing log4j.
Heri

> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] Behalf Of ks
> Sent: Tuesday, May 09, 2006 3:42 PM
> To: log4j-user@logging.apache.org
> Subject: Defining fileappender in log4j.xml
> 
> 
> I use log4j.xml to log to file as bellow. How can I log to a 
> file in a 
> directory called "folder" which is a sublevel below default. 
> The below code 
> only create a file called "folder.workshop_test.log" and not 
> creating the 
> file "workshop_test.log" inside directory "folder".
> 
> 
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";>
>   <appender name="APPLOGFILE" 
> class="org.apache.log4j.RollingFileAppender">
>     <param name="File"   value="folder.workshop_test.log" />
>     <param name="Append" value="true" />
>     <param name="MaxFileSize" value="3000KB" />
>     <layout class="org.apache.log4j.PatternLayout">
>       <param name="ConversionPattern" value="%d{DATE} %-5p 
> %-15c{1}: %m%n"/>
>     </layout>
>   </appender>
> 
> 
> Thanx 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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

Reply via email to