Optional
appendAppend to existing file.
Optional
bufferOptional
enabledWhether transport is enabled.
File path for logs. Required.
Optional
flushOptional
forceOptional
formatOutput format for log entries.
Optional
fsyncForce synchronous writes with fsync. Warning: Enabling this significantly reduces performance.
Optional
levelMinimum log level to process.
Optional
maxMaximum bytes to write in a single operation. Controls the chunk size for each write system call.
Should be larger than minLength to allow efficient batching. Typical values: 16KB-64KB depending on system I/O characteristics.
Optional
minMinimum buffer length before auto-flush (minLength in sonic-boom). Controls when the buffer is automatically flushed to disk.
Performance considerations:
Optional
mkdirCreate directory if it doesn't exist.
Optional
modeFile mode for new files.
Optional
nameTransport name for identification.
Optional
retryRetry on EAGAIN errors.
Configuration options for async file transport.
These options control the behavior of the async file transport, including buffering, file handling, and performance tuning.
AsyncFileTransportOptions