I'm trying to have the winston logging output logger.debug for a node.js/socket.io project I'm working on but I can't get the debug to show up in the console.
I create logger with:
var logger = new (winston.Logger)({
transports: [
new (winston.transports.Console)()
]
});
On connection I'm trying to get the the debug to say it has connected
io.on('connection', function (socket) {
socket.emit('init','init-yes');
logger.debug("Socket.on has connected");
logger.log('debug', 'This is the debug');
...
but nothing appears in the console. I checked out the git page but still seem to be not understanding something.
EDIT As was suggested I updated the logger creation to:
var logger = new winston.Logger({
transports: [
new winston.transports.Console({ level : 'debug' })
]
});
but I'm still not getting the logger.debug("Message here") to work.
Any help would be greatly appreciated. Thank you for your time!