Open jnovack opened 9 years ago
As part of the work i was doing earlier this year I was attempting to remove all of these console logs. Unfortunately a bit of life has happened since then and I have not been as active as I would like to be. As winter roles around again for me I should get more inside time to work on this.
I wasn't complaining, I was opening a discussion. I appreciate your hard work in making my Amazon Dash button useful. :)
Do you feel that emitting them back as "error" (or whatever) is appropriate?
I submitted https://github.com/mranney/node_pcap/pull/195 to address this (without requiring a major version change). It basically keeps the functionality as-is, but also provides mechanisms to attach it to another logger (like bunyan) or silence the output altogether.
This is a great first start, although, when including a package that includes node-pcap, it doesn't solve the problem (as the first package would then have to be modified by the calling application).
I would really like to a default silent (if approved by the maintainer).
@jnovack, I'm in agreement (since my primary interest in this is from https://github.com/hortinstein/node-dash-button/). But I figured silencing it by default would warrant a breaking change from the existing application, and since I wasn't bold enough to suggest a major version that's why I went the passive route.
There are times when I just want pcap to do what it's supposed to do and not complain when it sees something it cannot process.
Should the errors be emitted back so that the calling application can decide whether or not it wants to do something about it?