Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



I plan to make a RotatingFile handler, but at the same time, what's wrong with Unix logrotate?


It'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.



Why is your logging library handling log rotation? Also, not everyone logs to disk straight from process or at all.


We use winston-filerotatedate for winston logrotation.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: