Closed
Description
Pardon me if this has already been answered. I know "debug" is not a logger and I respect that. I do not want to log with debug, I'd like debug to output in my logs instead. :-)
Specifically I'd like all third party modules using the ubiquitous "debug" to log through Winston's debug function. It's a matter of consistency turning log levels on/off dynamically.
Is it possible?
I've tried to leverage node's module caching in this way:
var Debug = require('debug');
var Logger = require('winston');
Debug.log = Logger.debug;
var mod = require('module_using_debug');
It's not working... :-(
Metadata
Metadata
Assignees
Labels
No labels