File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes [SOLVED] log4j RollingFileAppender file location Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "[SOLVED] log4j RollingFileAppender file location" Watch "[SOLVED] log4j RollingFileAppender file location" New topic
Author

[SOLVED] log4j RollingFileAppender file location

Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 417
Hi folks!

I'm having trouble with RollingFileAppender.
Do I need to create the file or log4j creates it?
Where the file should be located?

Here is my log4j.properties:

Thank you!

edited: problem solved
Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 417
I wrote the complete path and worked and it's not necessary to create the file.

Is it possible to use a relative path?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

What would it be relative to?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 417
Bear Bibeault wrote:What would it be relative to?

Well, my doubt is where log4j would create the file if I just use: log4j.appender.R1.File=log4j.log
But I think it doesn't work...
But there's no problem. Thank you! =)
Tanzy Akhtar
Ranch Hand

Joined: Jul 19, 2009
Posts: 110
Hi Leandro,

Well the log file will generate to the classpath from where the log4j is getting initialized.
Most probably the path will be parallel to the bin directory.

Thanks,
Tanzy.


Roll with punchers, there is always tomorrow.
Techie Blog -- http://jtanzy.blogspot.com/
Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 417
tanzy akhtar wrote:Hi Leandro,

Well the log file will generate to the classpath from where the log4j is getting initialized.
Most probably the path will be parallel to the bin directory.

Thanks,
Tanzy.

I did a search on my computer and I found the log files.
They are located in this folder: ...\eclipse-jee-ganymede-win32\eclipse

Thank you!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [SOLVED] log4j RollingFileAppender file location
 
Similar Threads
problem in configure Log4j with chainsaw
Log4j not writing to FileAppender
Log4j output files
server could not started
problem in configure Log4j with chainsaw