Log4J: Configure Log File and Path?

G

gilgantic

How do I configure a file and path in my log4j.lcf configuration file?
Below is a snippet of my configuration, I would like to place log file
C:\example.log, but it continues to place the log file at my
<IDE_ROOT>\example.log. (I am using WebSphere Studio 5.1). What to do?

log4j.rootLogger=debug, stdout, R
 
O

Oscar kind

gilgantic said:
How do I configure a file and path in my log4j.lcf configuration file?
Below is a snippet of my configuration, I would like to place log file
C:\example.log, but it continues to place the log file at my
<IDE_ROOT>\example.log. (I am using WebSphere Studio 5.1). What to do?

log4j.rootLogger=debug, stdout, R
.
.
.
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=C:\example.log


Try these (one at a time) instead of that last line:

log4j.appender.R.File=C:\\example.log
log4j.appender.R.File=${user.home}/example.log
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top