You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MESSAGE symbol in the info object seems to get messed up when using "formats".
"winston": "^3.0.0"
"winston-syslog": "^2.0.0"
I place a "console.log( info )" right at the top of the log() method. Consider this example with no formats:
constwinston=require('winston');require('winston-syslog');letlog=winston.createLogger({transports: [newwinston.transports.Syslog({host: '192.168.99.100',port: 514,protocol: 'udp4',app_name: 'test'})]});log.info('This is a test!!');setTimeout(()=>{process.exit(0);},1000);
The console.log shows:
{message: 'This is a test!!',level: 'info',[Symbol(level)]: 'info',[Symbol(message)]: '{"message":"This is a test!!","level":"info"}'}
and that is good. Now consider this example:
constwinston=require('winston');require('winston-syslog');letlog=winston.createLogger({format: winston.format.combine(winston.format.label({label: 'right meow!'}),),transports: [newwinston.transports.Syslog({host: '192.168.99.100',port: 514,protocol: 'udp4',app_name: 'test'})]});log.info('This is a test!!');setTimeout(()=>{process.exit(0);},1000);
The console.log now shows:
{message: 'This is a test!!',level: 'info',label: 'right meow!',[Symbol(level)]: 'info'}
The [Symbol(message)] has disappeared and now "const output = info[MESSAGE];" on line #117 is undefined!
Not sure if this is a problem inside winston or here in syslog.
The text was updated successfully, but these errors were encountered:
The MESSAGE symbol in the
info
object seems to get messed up when using "formats".I place a "console.log( info )" right at the top of the log() method. Consider this example with no formats:
The console.log shows:
and that is good. Now consider this example:
The console.log now shows:
The
[Symbol(message)]
has disappeared and now "const output = info[MESSAGE];" on line #117 is undefined!Not sure if this is a problem inside winston or here in syslog.
The text was updated successfully, but these errors were encountered: