Log4j RollingFileAppender requires absolute path?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   tiffany_cavanaugh
Posted On:   Friday, December 13, 2002 01:52 PM

I want to save the logs to a file on the clients machine.


Here is the property setting:



log4j.appender.R=org.apache.log4j.RollingFileAppender


log4j.appender.R.File=${user.home}\mylog.log



This works on windows but crashes on linux because of the '\'.


I was wondering is there a special way of writing the path so Log4j will treat it correctly on the appropriate OS?

Thank you,

-- babs

Re: Log4j RollingFileAppender requires absolute path?

Posted By:   Anonymous  
Posted On:   Friday, December 13, 2002 09:05 PM

Try forward slash ( / ). I didn't faced any problems like that. It worked fine in both Windows and Linux.



log4j.appender.R.File=${user.home}/mylog.log


About | Sitemap | Contact