martinrusev / solid-node

Node.js client for Solid

Home Page:https://solidapp.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EventEmitter

qzaidi opened this issue · comments

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.

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

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.