Skip to main content

@webda/workoutReadme | API


Class: FileLogger

Record all messages in file

Extends

Constructors

new FileLogger(output, level, filepath, sizeLimit, format)

new FileLogger(output, level, filepath, sizeLimit, format): FileLogger

Parameters

output: WorkerOutput

level: WorkerLogLevel

filepath: string

sizeLimit: number= undefined

format: string= ConsoleLogger.defaultFormat

Returns

FileLogger

Overrides

WorkerLogger.constructor

Source

src/loggers/file.ts:18

Properties

filepath

filepath: string

Source

src/loggers/file.ts:14


format

format: string

Source

src/loggers/file.ts:16


level

level: WorkerLogLevel

Overrides

WorkerLogger.level

Source

src/loggers/file.ts:13


listener

listener: (msg) => void

Parameters

msg: WorkerMessage

Returns

void

Inherited from

WorkerLogger.listener

Source

src/loggers/index.ts:8


output

output: WorkerOutput

Inherited from

WorkerLogger.output

Source

src/loggers/index.ts:9


outputCount

outputCount: number = 0

Source

src/loggers/file.ts:12


outputStream?

outputStream?: WriteStream

Source

src/loggers/file.ts:11


sizeLimit

sizeLimit: number

Source

src/loggers/file.ts:15

Methods

close()

close(): void

Close the listener

Returns

void

Inherited from

WorkerLogger.close

Source

src/loggers/index.ts:29


filter()

filter(msg): boolean

Parameters

msg: WorkerMessage

Returns

boolean

Source

src/loggers/file.ts:56


getLine()

getLine(msg): string

Parameters

msg: WorkerMessage

Returns

string

Source

src/loggers/file.ts:65


onMessage()

onMessage(msg): void

Process a WorkerOutput message

Parameters

msg: WorkerMessage

Returns

void

Overrides

WorkerLogger.onMessage

Source

src/loggers/file.ts:35


rotateLogs()

rotateLogs(filepath): void

Parameters

filepath: string

Returns

void

Source

src/loggers/file.ts:84