File Rotate
Saves events to the local file system as JSON, one event per line. Files are rotated once they reach a size limit, and old files can be compressed automatically. Reach for it when you want a durable, on-disk log of chain data without standing up a database or broker.
Configuration
[sink]type = "FileRotate"output_path = "/var/oura/mainnet"output_format = "JSONL"max_bytes_per_file = 1_000_000max_total_files = 10compress_files = truetype(required): the literal valueFileRotate.output_path(required): the path-like prefix for the output log files.output_format(optional): the serialization format. The only option at the moment isJSONL(JSON, one object per line).max_bytes_per_file(optional): the size a file may reach before it’s rotated.max_total_files(optional): how many files to keep before the oldest are deleted.compress_files(optional): whentrue, rotated files are gzip-compressed.
On a busy network this sink can produce a lot of data. Set max_total_files (and ideally
compress_files) so the logs are bounded — otherwise they’ll grow until they fill the disk.