Closed zit0un closed 3 years ago
Usage describes different options for winston.transports.Syslog. Among them type: The type of the syslog protocol to use (Default: BSD, also valid: 5424).
type: The type of the syslog protocol to use (Default: BSD, also valid: 5424).
But if you specify
logger.add( new winston.transports.Syslog({ type: 5424, protocol: 'unix', path: '/var/run/syslog', }) )
You'll get an error:
this.type = options.type.match(/bsd|3164/i) ? "RFC3164" : "RFC5424";
A correct option for "type" option is thus 'bsd', '3164', '5424', (as strings, and not simply 3164 or 5424 as numbers), 'RFC3164' or 'RFC5424'.
'bsd'
'3164'
'5424'
3164
5424
'RFC3164'
'RFC5424'
I created a pull request.
Usage describes different options for winston.transports.Syslog. Among them
type: The type of the syslog protocol to use (Default: BSD, also valid: 5424).
But if you specify
You'll get an error:
this.type = options.type.match(/bsd|3164/i) ? "RFC3164" : "RFC5424";
A correct option for "type" option is thus
'bsd'
,'3164'
,'5424'
, (as strings, and not simply3164
or5424
as numbers),'RFC3164'
or'RFC5424'
.