tracer
tracer copied to clipboard
No way of appending custom transport while keeping default transport
I'd like to retain the default transport behavior (console.log), while adding a custom transport (to route errors to Sentry). Currently there's no simple way of doing this. You have to copy paste the code for the existing transport into the transport config array.
Maybe expose the default transport as exports.DEFAULT_TRANSPORT, to allow for code like this:
const tracer = require('tracer');
tracer.console({
transport: [
tracer.DEFAULT_TRANSPORT,
data => {
// ... custom transport logic
}
]
})
I can take a stab at a PR if you think this is worth doing.
I think the default transport behavior is only console.log, no more complex
[Closing out issues I authored that appear to be stagnant.]