Avoid overwriting of logs
- by Koppar
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.