flatiron/winston — Issue #90: Question on winston file logging rollover support
Author: mkimnavcom
Created: 2012-01-30 18:01:46+00:00
State: open

Hi,

I'm adding winston logging to my server application.
I need to have the rollover capability for logging.
When I use winston file transport with maxsize set to 1000 (i.e. 1000
bytes) and maxFiles set to 3, the winston doesn't seem to do any
rollover.

Here is my simple test which doesn't work.
================================================================
var winston = require('winston');

winston.add(winston.transports.File, { filename: 'run.log', maxsize:
1000, maxFiles: 3 });

for (i=0; i<1000; i++) {
winston.info('0123456789');
}

================================================================
After running the script, I see only one log file with the size of
40000.

Do you see anything wrong with the above script?
Does anyone know what is necessary to perform the winston file
rollover?

Min