Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

mallocator/Winston-Rolling-File-Appender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Winston-Rolling-File-Appender

npm version Build Status Coverage Status Dependency Status

A rolling file transport for the logging library Winston for node.js. This transport has been modified from the original transport to create a log file for each day.

If configured with my.log as the filename, the generated files will be, for example:

my.2012-08-01.log
my.2012-08-02.log
my.2012-08-03.log
...
my.2012-08-10.log
my.log ( -> symbolic link to latest log file)

The transport has been used and tested on Linux machines. No idea if this works on Windows.

Deprecation Warning

This project is no longer actively maintained. If you're looking for a rotating log transport, you can find alternatives on npmjs.org such as winston-daily-rotate-file

Usage

var winston = require('winston');
require('rolling-file-transport');

winston.loggers.add('myLogger', {
	rollingFile : {
		filename : '/path/to/my/filename.log',	// files will use filename.<date>.log for all files
		level : 'info',							// Set your winston log level, same as original file transport
		timestamp : true,						// Set timestmap format/enabled, Same ass original file transport
		maxFiles : 10,							// How many days to keep as back log
		json : false							// Store logging data ins json format
	}
});

Install

npm install --save rolling-file-transport

About

A rolling file appender for the logging library winston for node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •