EventEmitter #2

Open
qzaidi opened this Issue Mar 30, 2012 · 2 comments

Projects

None yet

2 participants

@qzaidi
qzaidi commented Mar 30, 2012

Can we convert this to event emitter, so I can handle errors myself. Right now, if amon is down, it prints console.log messages

Error sending log data to Amon on /api/log/XXXXXX
Please make sure that the web application is running on YYYYY

Instead, it can emit an error and I may just chose to log the original error message in my error handler.

I am willing to take this up if you can merge.

@martinrusev
Owner

That makes sense. I think we can replace it with an Event emitter, but can you please send me an example :)

@qzaidi
qzaidi commented Apr 1, 2012

I forked the repo and made changes here https://github.com/qzaidi/amon-node

Haven't submitted a pull request as I have not yet tested this. Besides, I have made some functions private, so some of the tests are breaking. Please have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment