Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[SOLVED] log4j RollingFileAppender file location

 
Leandro Coutinho
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What would it be relative to?
 
Leandro Coutinho
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Leandro Coutinho
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic