Represents the options for the SingleJsonlFileManager

interface FileHandlerOptions {
    archiveFolderPath: string;
    baseFilename: string;
    createFolders: boolean;
    defaultBaseFilename?: string;
    fileEncoding: BufferEncoding;
    inactiveTimeout?: number;
    logger?: LoggerInstance;
    propertyData?: string;
    propertyFileName?: string;
    propertySkip?: string;
    propertySkipValue?: string | number | boolean;
    retryOptions?: RetryOptions;
    rotationInterval?: number;
    rotationLines?: number;
    rotationSize?: number;
    separator?: string;
    workingFolderPath: string;
}

Hierarchy (View Summary)

Properties

archiveFolderPath: string

Path to the folder where the closed files are stored

'./data/archive'
'./data/archive'
baseFilename: string

Base filename for the files

createFolders: boolean

If true, it will create the folders if they don't exist

true
true
defaultBaseFilename?: string

Base filename for the files

'file'
'file'
fileEncoding: BufferEncoding

Encoding to use when writing to files

'utf-8'
inactiveTimeout?: number

Maximum inactivity time in milliseconds before a handler is cleaned up

60000
undefined

Logger instance to use

undefined
propertyData?: string

If set, this property will be used to store the data in the file, it could be a nested property in the data object expressed as a dot separated string

'data.property'
undefined
propertyFileName?: string

If set, this property will be used as the filename, it could be a nested property in the data object expressed as a dot separated string

'data.property'
undefined
propertySkip?: string

If set, this property will be used to skip the data, it could be a nested property in the data object expressed as a dot separated string

'data.property'
undefined
propertySkipValue?: string | number | boolean

If set, this value will be used to skip the data, it could be a string, number or boolean. If value is not set, but propertySkip is set, a not falsy value will be used to skip the data, this means that any value that is not false, 0 or '' will be used to skip the data.

'skip' | 0 | false
undefined
retryOptions?: RetryOptions

Retry options for the file handler operations

{ attempts: 3, timeout: 1000, waitTime: 1000, maxWaitTime: 10000 }
{ attempts: 3, timeout: 1000, waitTime: 1000, maxWaitTime: 10000 }
rotationInterval?: number

Interval in milliseconds to rotate the file

3600000 (1 hour)
undefined
rotationLines?: number

Max number of lines before rotating the file

10000 (10k lines)
undefined
rotationSize?: number

Max size of the file before rotating it

10485760 (10 MB)
undefined
separator?: string

Separator to use when writing the data to the file

'\n'
'\n'
workingFolderPath: string

Path to the folder where the working files are stored

'./data/working'
'./data/working'