Framework
FileDrainOptions
Interface: FileDrainOptions
Options for creating a file drain imperatively.
Properties
| Property | Type | Description |
|---|---|---|
blocking? | boolean | If true, awaits each write before returning (sync-like). Default: false |
colorMap? | boolean | Generate a companion .colormap file that records ANSI escape code positions. This allows colors to be reconstructed later. Only used when stripAnsi is true. Default: false |
format? | "text" | "json" | Output format. Default: 'text' |
level? | LogLevel | Minimum log level to write. |
maxFiles? | number | Maximum number of rotated files to keep. Default: 5 |
maxSize? | number | Maximum file size in bytes before rotation. Default: 10MB |
path | string | Absolute or relative file path for log output. |
stripAnsi? | boolean | Strip ANSI color codes from output. Default: true |
timestamp? | TimestampFormat | Timestamp format to prepend to log entries. Default: false (no timestamp) |
