Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.util.logging.Logger overrides data

Tags:

java

logging

java.util.logging.Logger override (overwrites) the file data instead of add to end of file.

Is this correct? should I create 1 file for each time I initialize the app and the log system?

If not, how do I set it to write to the end of the file?

like image 236
The Student Avatar asked Nov 28 '22 19:11

The Student


1 Answers

java.util.logging.FileHandler.append=true

The append specifies whether the FileHandler should append onto any existing files (defaults to false).

FileHandler Doc

There are other properties you have control over like the size of log files and how many to cycle through but I think that property is the one you are concerned with.

like image 141
Andrew Hubbs Avatar answered Dec 06 '22 11:12

Andrew Hubbs