• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

[SOLVED] log4j RollingFileAppender file location

 
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?
 
Marshal
Posts: 67300
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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! =)
 
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!
 
Poop goes in a willow feeder. Wipe with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!