0

We have a node js application , which didn't have a log rotation concept to start with and the all the content used to be written into the same file and it grew so large the file size is now 1.5Gb on average. Let's call it app.log

Now we have introduced Winston log rotation and it's working file in lower environments with smaller file sizes but if the size is large let's say in GB's it's creating new files every day but unable to remove the parent file called app.log.

Could any one suggest how to fix this ? Our service runs in Linux.

Should we create a script to remove the large file first ?

  • Have you checked the logs, what does it say? – Apoorva Chikara Dec 20 '21 at 14:32
  • 1
    Maybe [this](https://stackoverflow.com/questions/38273226/how-to-delete-files-from-winston-log-after-certain-days-limit) can help you. You need to set a `maxFiles` value otherwise no file will be deleted. – DiniFarb Dec 20 '21 at 18:14

0 Answers0