This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Java in General and the fly likes Log events to a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Log events to a file" Watch "Log events to a file" New topic

Log events to a file

Arthur Buliva
Ranch Hand

Joined: Mar 08, 2006
Posts: 101
Am intending to log events occurring in a Java app to a file. Code:

works fine, but am having multiple files yet the FileHandler has been implicitly asked to append to the log file. What am I doing wrong?
Francesc Martinez

Joined: Feb 13, 2009
Posts: 24
I don't know, but you could use Log4J instead (directly or through Commons Logging).
I agree. Here's the link:
subject: Log events to a file
It's not a secret anymore!