This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Can logging using FileHandler be a bottleneck? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Can logging using FileHandler be a bottleneck?" Watch "Can logging using FileHandler be a bottleneck?" New topic
Author

Can logging using FileHandler be a bottleneck?

Alexander Bunkenburg
Greenhorn

Joined: Nov 02, 2006
Posts: 8
Hello people

I am considering logging business events in a J2EE web application by using Java logging and FileHandler. I am wondering whether that could cause a performance bottleneck, since many log records will be written to the one file. I am doing google searches, but it seems people are not hindered by FileHandler.

What are your experiences and opinions?

Is logging a busy web application to one file with java logging and FileHandler likely to become performance bottleneck?

Thanks
Lucy Hummel
Ranch Hand

Joined: Apr 07, 2005
Posts: 232
HJi Alexander,

You got nothing for free.

If you log, memory, processor time are used to do it and you gain information what goes on in your application. You have good choices to switch trace mode to debug the system.

If you do not log, memory, processor time are free, but you do not have any clue what went wrong in a failure case.

The log stuff is already some years old so you can imangine that a lot of people, desingers have spent a lot of time to improve performance on the code.


----------------------------------<br />| SCJP, SCWCD, SCBCD, SCEA, SCJD |<br />----------------------------------
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
This forum is dedicated to the SCJD certification. Please post in a more appropriate forum in future.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
jQuery in Action, 2nd edition
 
subject: Can logging using FileHandler be a bottleneck?
 
Similar Threads
How to make each log entry start on a new line?
java util logging problems
Can logging using FileHandler be a bottleneck?
question regarding logging
how to append and limit the size of log file using java.util.logging