Avoid overwriting of logs

Posted by Koppar on Oracle Blogs See other posts from Oracle Blogs or by Koppar
Published on Thu, 14 Jun 2012 04:42:45 +0000 Indexed on 2012/06/15 15:24 UTC
Read the original article Hit count: 226

Filed under:

What usually happens is, the logs get filled up and begin getting overwritten, which makes them useless. To avoid it, use these 2 properties in the logging.properties file to suit your requirement:

java.util.logging.FileHandler.count  = x (it is 1 by default, increase it to a bigger value)

This number specifies the number of log files that can be created before overwriting starts. For instance, if you set it to 5, java0.log, java1.log ... java5.log will be created to log details so more information can be captured

Likewise, java.util.logging.FileHandler.limit  would specify the size of each log.

© Oracle Blogs or respective owner

Related posts about /Sun