4 ms·
Not directly related, but the author mentioned Winston, which made me think: who are these people using Node.js that don't need log rotation? Winston doesn't h
by mratzloff 13y ago
Not directly related, but the author mentioned Winston, which made me think: who are these people using Node.js that don't need log rotation? Winston doesn't have built-in support. The only logging library I've found that supports this without extra effort is log4node.[1]
[1] https://github.com/bpaquet/log4node https://github.com/bpaquet/log4node
- ricardobeat 13y agoSee https://github.com/trentm/node-bunyan https://github.com/trentm/node-bunyan
- seanmonstar 13y agoI plan to make a RotatingFile handler, but at the same time, what's wrong with Unix logrotate?
- mratzloff 13y agoIt's used in conjunction with logrotate. Long-running programs will happily continue using the same file handle until they are signaled in some way to reopen the file path (usually in response to USR1 and HUP). See Nginx, Apache httpd, MongoDB, etc.
- mnutt 13y agoWe use winston-filerotatedate for winston logrotation.
- sandfox 13y agoWhy is your logging library handling log rotation? Also, not everyone logs to disk straight from process or at all.