We have a use-case of using this library without a need to write any error to the console if writing to DataDog failed due to network issues, and we would prefer to silently ignore this failure instead.
Motivation
Having the following lines inside datadog.js causes the errors to automatically be shown in the console:
console.error('The previous log have not been saved')
console.error(`${err.message}\n${err.stack}`)
Example
An example for a workaround can be adding a new option (or re-using the noStdout option from the CLI and checking it before logging here:
if (!this._options.noStdout) {
console.error('The previous log have not been saved')
console.error(`${err.message}\n${err.stack}`)
}
If this workaround makes sense to you please let me know and I'll open a PR. (If there is an alternative, I'll be happy to hear đ )
đ Feature Proposal
We have a use-case of using this library without a need to write any error to the console if writing to DataDog failed due to network issues, and we would prefer to silently ignore this failure instead.
Motivation
Having the following lines inside
datadog.js
causes the errors to automatically be shown in the console:Example
An example for a workaround can be adding a new option (or re-using the
noStdout
option from the CLI and checking it before logging here:If this workaround makes sense to you please let me know and I'll open a PR. (If there is an alternative, I'll be happy to hear đ )
thanks!