Rotation with zip not save order of files
See original GitHub issueVersions:
"winston": "^3.2.1",
"winston-daily-rotate-file": "^4.5.0"
Code:
new (transports.DailyRotateFile)({
filename: "%DATE%.log",
datePattern: 'YYYY-MM-DD',
zippedArchive: true,
maxSize: 1m,
maxFiles: 50,
})
After reached the size limit on the same day, it continues to the next logs (2020-06-29.log.1) and zipping the old file (2020-06-29.log.gz). But, after starting the program again, It will create a new log (2020-06-29.log) again and not continue from the previous counting (2020-06-29.log.1). Also, after we reach the max size again, It will write to an existing file (2020-06-29.log.1), and it is not zipping the new log (2020-06-29.log) because we already have a zip file on this name.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Compress old log files and move to new directory
But those files are not zipped properly. Will anyone please help me in figuring out the mistake my code? zip · archive.
Read more >Picture Rotation - WinZip
After downloading your pictures from the camera, but before compressing them into your Zip file, WinZip will rotate the pictures as needed, as...
Read more >Logrotate files with date in the file name - Stack Overflow
These files are not being rotated. I understand that I have to configure these in /etc/logrotate.d/tomcat6 file where rotation for catalina.out is configured....
Read more >How to implement audit log rotation with compression based ...
For what I am doing, I don't need the files compress yet. So I didn't do the compression option. Will test the rotation...
Read more >How to Configure Logrotate to Manage Logfiles (Step by Step)
Logrotate uses configuration files to set rules for the rotation's behavior, such as the maximum log files to keep, how often the rotation...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you, @yakirzana. I’m following https://github.com/rogerc/file-stream-rotator/pull/72 and will update this transport once that change has been merged. I’ll leave the ticket open until then.
Please provide the smallest code snippet that reliably reproduces this problem. Thank you.