Mega Code Archive

 
Categories / Java Tutorial / Log
 

The FileHandler is able to write to a single file, or write to a rotating set of files as each file reaches a specified maximum size.t

The next number in a sequence is added to the end of the name of each rotating file, unless a generation (sequence) pattern is specified elsewhere. The properties for the FileHandler are listed in the following table. Property NameDescriptionDefault Value FileHandler.levelLog level for the handler.Level.INFO FileHandler.filterFilter to use.undefined FileHandler.formatterFormatter to use.java.util.logging.XMLFormatter FileHandler.encodingCharacter set encoding to use.Default platform encoding FileHandler.limitSpecifies approximate maximum number of bytes to write to a file. 0 means no limit.0 FileHandler.countSpecifies how many output files to cycle through.1 FileHandler.patternPattern used to generate output filenames.%h/java%u.log FileHandler.appendBoolean value specifying whether to append to an existing file or overwrite it.false