This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Log events to a file" Watch "Log events to a file" New topic
Author

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
Greenhorn

Joined: Feb 13, 2009
Posts: 24
I don't know, but you could use Log4J instead (directly or through Commons Logging).
 
Consider Paul's rocket mass heater.
 
subject: Log events to a file