FileHandler
FileHandler is a term used in many logging frameworks to describe a component that writes log records to a file. It acts as a bridge between a logger and persistent storage. A FileHandler typically accepts log entries from a logger, formats them using a configured formatter, and writes the result to a file. It may be configured to write to a single file or to rotate to new files when certain conditions are met, such as reaching a size limit or at specified time intervals. Rotation policies often include keeping a finite number of backup files and optionally compressing old files.
Common options include the file path, whether to append to existing logs or overwrite, the character encoding,
Examples exist in major languages: in Java, the standard logging framework provides a FileHandler; in Python,
FileHandler remains a foundational element of logging architectures, providing durable, configurable persistence for log data.