Class LogFileHandler


public class LogFileHandler extends StreamHandler
A java.util.logging file handler with support for date patterns in log file name. Log file rotation is based on the file name pattern date format.

Configured by the following properties:

  • [class-name].level -- a minimum log level (Level.ALL)
  • [class-name].filter -- an optional log filter (none)
  • [class-name].formatter -- a log formatter (org.rapidcontext.util.LogFormatter)
  • [class-name].encoding -- an optional encoding (platform default)
  • [class-name].pattern -- a log file name pattern, including the file path ("%t/rapidcontext-%d{yyyy-MM-dd}.log")
  • [class-name].append -- a log append flag (true)

A log file pattern may contain the following special character sequences:

  • "%t" -- the system temporary directory
  • "%h" -- the value of the "user.home" system property
  • "%d" -- the current date (in YYYY-MM-DD format)
  • "%d{...}" -- a generic date and time format (using SimpleDateFormat pattern)
  • "%%" -- a single percent sign "%"
Version:
1.0