Description
On the example located at https://github.com/debug-js/debug#output-streams, it shows that's possible to set custom log()
functions for each namespace, but also that setting it directly on the debug
module takes precedence and will be used instead of the namespace ones. This is specially useful in my use case, since I want to capture Mediasoup debuging Logger and redirect it to Moleculer logger. Problem is that according to
Lines 112 to 113 in c0805cc
log()
function has absolute priority, so it's not possible to do it globally, and it's not possible to directly bind on top of Mediasoup Loggers since they are private, so I'm in an end road.
Since the linken example at https://github.com/debug-js/debug/blob/master/examples/node/stdout.js doesn't exists too, I'm not sure if the documentation is outdated or wrong, or if setting debug.log()
should effectively override per-namespace log()
function and this is in fact a bug. Besides fixing this one way or another, how can I solve my problem of redirect Mediasoup log messages to Moleculer?