Intel - nodejs logging that plays nice with console.log
seanmonstar.comName is definitely going to be confusing. I completely expected this to be something Intel was doing nodejs related.
The name is going to be forced to change, the OP should just rename it now while it's not an issue.
Even if there wasn't a copyright issue, what kind of name is 'intel' anyway? Might as well called it 'data' or 'stream'.
You might as well call it Microsoft, HP, or IBM and pretend those are generic names within the confines of our industry.
In case anyone is looking for a debug utility, not for archival logs, look no further than http://github.com/visionmedia/debug. Named loggers, nice formatting, easy to use and you get timers for free:
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 :)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]
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.
I thought that Intel made a nodejs logging tool, little did I know that the tool is just called Intel.
I feel slightly disappointed (no offence op)...
Sortof an odd choice for a name, considering the brand recognition in the tech industry, otherwise neat.
I guess you mean "brand recognition" ?
Unless by naming it as such OP is looking for some brand reconditioning :)
hah - yes. shouldn't comment mid pull request
I wouldn't exactly call Python's logging module glorious. Its API is unintuitive and foreign (lifted from Java), any customisation requires subclassing and it destroys performance on PyPy (because of the constant use of sys.exc_info().
I'd like to use this on some of my projects but I know the dev is going to receive a cease & desist from Intel sooner rather than later, breaking dependencies.
OP - could you rename the library to make us all feel a little bit better about using it?
When naming a project, it seems a lot of people don't stop and think about what it's going to be like to try to Google it.
I tried to make a better console for Node too![1]
An excellent example of why you never let developers name things