> Why do you need the init()? Why not...
>
> // log.js
> // just export an instance. done.
> export = require("bunyan")();
>
>
> // In some other file...
> var log = require("log");
> log.info("blah blah blah");
>
>
> (this suggestion is untested)
>Well, the logger was just a generalized demo of the concept. I do the same thing for connections to cassandra, redis, etc. In the specific case of the logger, the initialization sets up a zeromq stream for the logs and specific messages, and also for stats and things. Something I've been looking for is a guide of bad practices. There are a bunch about good practices and conventions, but when straying from those, you don't want to come to the realization later on that... "I've made a huge mistake..." -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
