daily-rotating-file-stream
v1.1.0
Published
file stream being rotating daily
Downloads
2
Readme
daily-rotating-file-stream
Installation
npm i daily-rotating-file-stream
API
DailyRotatingFileStream(options)
fileName
The name of the log file(s). Must contain a %DATE%
placeholder.
dateFormat (optional)
The format of the date that will replace the placeholder %DATE%
in the file name. Defaults to DDMMYYYY
.
Supports all formating options of fast-date-format.
bufferSize (optional)
The size of the internal buffer that is used to store the logs before writing them to the file. Defaults to 4096
.
DailyRotatingFileStream#write(string)
Writes a string to the file.
DailyRotatingFileStream#flush()
Flushes the content of the buffer to the file.
DailyRotatingFileStream#destroy()
Destroys the stream.
DailyRotatingFileStream#end()
Flushes the data and ends the stream.