# write-file Write the `payload` field of events to `path`. Will be treated as binary when no `encoding` is specified. ## Config **Required:** - `path`: File path (supports ~ expansion) **Optional:** - `encoding`: Output encoding (utf8, ascii, base64) - `append`: Append to file instead of overwriting ## Example ```yaml pipeline: write-file: config: path: ~/logs/output.log encoding: utf8 append: true ```