You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varloaderErrorLogMaxSize=10485760;varrollLoaderError=function(){varroller=newstreamroller.RollingFileStream('./log/loader-error.log',loaderErrorLogMaxSize,10);roller.end(function(){logger.info('Loader -','loader-error.log checked for roll.');});};
This works on windows and each time I invoke this code, the file is normally rolled.
But on unix I have to add a write('') call to trigger the roll.
varloaderErrorLogMaxSize=10485760;varrollLoaderError=function(){varroller=newstreamroller.RollingFileStream('./log/loader-error.log',loaderErrorLogMaxSize,10);roller.write('');roller.end(function(){logger.info('Loader -','loader-error.log checked for roll.');});};
I use this function in the callback of a fs.watch because the file is managed by pm2 and cannot roll by itself.
So each time this file change, I check the size then I invoke the rollLaoderError function then I have to write something in the file...
The text was updated successfully, but these errors were encountered:
Actually I have this :
This works on windows and each time I invoke this code, the file is normally rolled.
But on unix I have to add a write('') call to trigger the roll.
I use this function in the callback of a fs.watch because the file is managed by pm2 and cannot roll by itself.
So each time this file change, I check the size then I invoke the rollLaoderError function then I have to write something in the file...
The text was updated successfully, but these errors were encountered: