Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NodeJS winston log file not change upon size limit

I'm using Winston logging and have specified file size to be max 10MB.

{
    filename: 'e:\app.log', 
    json:false, 
    maxsize:'10MB', 
    maxFiles:'10', 
    timestamp:true, 
    level:'silly'
}

I'm expecting the app.log file to be rotated upon size reaching 10MB, but this has never happened and my log file grows to even GBs.

Is there something I'm doing wrongly? Thanks.

like image 561
Lee Avatar asked Jul 30 '14 03:07

Lee


1 Answers

As you can see here the maxsize must be in bytes so change it for 10000000

like image 60
Victor Castillo Torres Avatar answered Nov 08 '22 18:11

Victor Castillo Torres