LogoRobo.js
Framework

FileDrainOptions

Interface: FileDrainOptions

Options for creating a file drain imperatively.

Properties

PropertyTypeDescription
blocking?booleanIf true, awaits each write before returning (sync-like). Default: false
colorMap?booleanGenerate 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?LogLevelMinimum log level to write.
maxFiles?numberMaximum number of rotated files to keep. Default: 5
maxSize?numberMaximum file size in bytes before rotation. Default: 10MB
pathstringAbsolute or relative file path for log output.
stripAnsi?booleanStrip ANSI color codes from output. Default: true
timestamp?TimestampFormatTimestamp format to prepend to log entries. Default: false (no timestamp)

On this page