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
Intel - nodejs logging that plays nice with console.log
11–20 of 23 posts
Re: Intel - nodejs logging that plays nice with console.log
#12 require('debug')('controllers:something')
debug('doing stuff', someObj)
then selectively enable it in the command-line with DEBUG=controllers:* node index.js
Express has debug built-in, so setting debug to express:* will turn on logging for it's internals. Just saying this 'cause I wish more tools came with built-in logging :)Re: Intel - nodejs logging that plays nice with console.log
#13Not 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
Re: Intel - nodejs logging that plays nice with console.log
#14Re: Intel - nodejs logging that plays nice with console.log
#15Not 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
Re: Intel - nodejs logging that plays nice with console.log
#16Re: Intel - nodejs logging that plays nice with console.log
#17Not 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
Re: Intel - nodejs logging that plays nice with console.log
#18Name is definitely going to be confusing. I completely expected this to be something Intel was doing nodejs related.
Re: Intel - nodejs logging that plays nice with console.log
#19Not 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?
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.
Re: Intel - nodejs logging that plays nice with console.log
#20OP - could you rename the library to make us all feel a little bit better about using it?