chrisa / node-dtrace-provider

Native DTrace probes for node.js apps
Other
319 stars 70 forks source link

Only log error once when DTraceProviderBindings can't be found #100

Closed melloc closed 7 years ago

melloc commented 7 years ago

Currently, we log the error message for failing to find DTraceProviderBindings.node 3 times: once for each of the directories Release, default, and Debug. This can get crazy pretty quickly when dtrace-provider gets included from multiple modules. When using a version of node whose console.error() function prints out the error's stack trace, this can fill up the entire screen.

I would like to determine a better way to handle loading the binding, as discussed in chrisa/node-dtrace-provider#96, but until then it would be good to at least print out a message only once.