debug
debug copied to clipboard
Reroute logging of an npm package that uses debug to a different logging function
I am using socket.io, which in turn uses debug for its logging needs. While it's nice that that means I can easily turn on/off logging via an environment variable, I am a bit stumped on how to get it to log to anywhere else but console.log. I am describing my use case (and what I tried and failed to do) here: https://github.com/socketio/socket.io/issues/4482
While this might in the end be a problem that has to somehow be solved in the socket.io package, I wanted to ask here too, in case there is any easy way to do this myself from the outside.