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
Overrides
Source
Properties
filepath
filepath:
string
Source
format
format:
string
Source
level
level:
WorkerLogLevel
Overrides
Source
listener
listener: (
msg
) =>void
Parameters
• msg: WorkerMessage
Returns
void
Inherited from
Source
output
output:
WorkerOutput
Inherited from
Source
outputCount
outputCount:
number
=0
Source
outputStream?
outputStream?:
WriteStream
Source
sizeLimit
sizeLimit:
number
Source
Methods
close()
close():
void
Close the listener
Returns
void
Inherited from
Source
filter()
filter(
msg
):boolean
Parameters
• msg: WorkerMessage
Returns
boolean
Source
getLine()
getLine(
msg
):string
Parameters
• msg: WorkerMessage
Returns
string
Source
onMessage()
onMessage(
msg
):void
Process a WorkerOutput message
Parameters
• msg: WorkerMessage
Returns
void
Overrides
Source
rotateLogs()
rotateLogs(
filepath
):void
Parameters
• filepath: string
Returns
void