daily-rotating-file-stream

1.1.0 • Public • Published

daily-rotating-file-stream

Build Status Coverage Status NPM version JavaScript Style Guide

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.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i daily-rotating-file-stream

Weekly Downloads

16

Version

1.1.0

License

MIT

Unpacked Size

10.1 kB

Total Files

6

Last publish

Collaborators

  • serayaeryn