Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

SerayaEryn/daily-rotating-file-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •