alexyoung / ircd.js

A Node ircd (IRC daemon)
GNU General Public License v3.0
528 stars 90 forks source link

Expose winston object in module exports #89

Closed zarino closed 9 years ago

zarino commented 9 years ago

I’m using ircd.js to run a tiny IRC server on localhost, as part of the (mocha) integration tests for an IRC client.

It does the job brilliantly, except the winston logging output is output to the console, while my test is running, and as far as I could tell, there's no way to turn it off:

screenshot

So I forked ircd.js to expose the winston object, letting me remove the console logger in my tests:

var ircd = require("ircdjs");
ircd.winston.remove(ircd.winston.transports.Console);
var server = new ircd.Server();

I figured this might be useful to other people in a similar position to me, so here's a pull request, for your consideration.

Thanks!

sespindola commented 9 years ago

Merged, thanks.

zarino commented 9 years ago

:+1: