DEV Community

Discussion on: Getting started with Winston Logger; A beginner's guide

 
jobizil profile image
Ugbem Job

Okay, I get you. Usually I use cron jobs to flush server logs after 7 days and error logs after 31 days ( I know this might not be be the most effective way during production).

Thread Thread
 
liranfar profile image
Liran Farage

How you do that? What type of method/function you call in order to flush the logs? That's what I couldn't find expect of ending the logger and waiting for a 'finish' event

Thread Thread
 
liranfar profile image
Liran Farage

Just to be clear, flushing the logs to the disk from the memory, something that usually happens behind the scene within the logger components.

Thread Thread
 
jobizil profile image
Ugbem Job • Edited

I have tried checking for this, but I could not get it. Incase you find a solution kindly post it here too, so we'll all learn.