flog is a fake log generator built in Go that produces realistic log entries in several common formats, including Apache common, Apache combined, Apache error, RFC3164, RFC5424, and JSON. It was created to help developers and operators test systems that consume log data, such as log pipelines, SIEMs, or streaming platforms like Amazon Kinesis. Users can control the output by specifying the log format, output file path, log type (stdout, plain log file, or gzip-compressed file), and either the number of lines or the total byte size of logs to generate. Additional options let you simulate timing behavior by configuring creation intervals and generation delays, as well as splitting output into multiple files based on line count or file size. The tool can run in a loop to continuously emit logs until terminated, making it suitable for soak testing or stress testing log ingestion services.
Features
- Generates fake logs in multiple common formats including Apache and syslog variants
- Supports several output types such as stdout, plain log files, and gzip archives
- Flexible controls for log volume using either line counts or byte sizes
- Timing simulation options with fixed intervals and adjustable delays for log creation
- Ability to split logs into multiple files based on lines or size and optionally overwrite
- Continuous generation mode for long-running tests of logging and streaming pipelines