This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

[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: 67289
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!
 
When you have exhausted all possibilities, remember this: you haven't - Edison. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!