Comparing version 0.2.0 to 0.2.1
@@ -302,3 +302,4 @@ /** | ||
// Map cef severity of 3..10 to syslog severity of 7..0 | ||
var syslogSeverity = 7 - (severity - 3); | ||
// So 10 -> 0, 9 -> 1, ... 3 -> 7 | ||
var syslogSeverity = 10 - severity; | ||
this.syslog.log(message, syslogSeverity); | ||
@@ -305,0 +306,0 @@ } |
@@ -105,6 +105,8 @@ var dgram = require('dgram'); | ||
log: function send(message, severity) { | ||
severity = severity || SEVERITY.notice; | ||
if (typeof severity === 'string'){ | ||
if (typeof severity === 'string') { | ||
severity = SEVERITY[severity]; | ||
} | ||
else if (typeof severity !== 'number') { | ||
severity = SEVERITY.notice; | ||
} | ||
@@ -111,0 +113,0 @@ // Format for syslog |
{ | ||
"name": "cef", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"main" : "lib/cef.js", | ||
@@ -5,0 +5,0 @@ "author": "Jed Parsons <https://github.com/jedp>", |
30851
832