nsyslog-parser
Advanced tools
Comparing version 0.2.3 to 0.2.4
{ | ||
"name": "nsyslog-parser", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "Syslog Parser. Accepts RFC 3164 (BSD) and RFC 5424 formats", | ||
@@ -5,0 +5,0 @@ "author": "David Gómez Matarrodona <solzimer@gmail.com>", |
@@ -1,2 +0,4 @@ | ||
const moment = require("moment"); | ||
const | ||
moment = require("moment"), | ||
Pri = require("./pri.js"); | ||
@@ -32,2 +34,7 @@ const RXS = { | ||
entry.prival = parseInt(entry.pri.match(RXS.prival)[1]); | ||
var prival = Pri.get(entry.prival); | ||
entry.facilityval = prival.facility; | ||
entry.levelval = prival.level; | ||
entry.facility = Pri.FACILITY[prival.facility].id; | ||
entry.level = Pri.LEVEL[prival.level].id; | ||
} | ||
@@ -34,0 +41,0 @@ else { |
@@ -8,3 +8,3 @@ # nsyslog-parser | ||
**Use** | ||
**Usage** | ||
```javascript | ||
@@ -20,8 +20,12 @@ const parser = require("nsyslog-parser"); | ||
**Result** | ||
**Results** | ||
```javascript | ||
{ | ||
originalMessage: '<34>Oct 11 22:14:15 mymachine su: \'su root\' failed for lonvick on /dev/pts/8', | ||
originalMessage: '<34>Oct 11 22:14:15 mymachine su: \'su root\' failed for lonvick on /dev/pts/8', | ||
pri: '<34>', | ||
prival: 34, | ||
facilityval: 4, | ||
levelval: 2, | ||
facility: 'auth', | ||
level: 'crit', | ||
type: 'BSD', | ||
@@ -39,2 +43,6 @@ ts: '2017-10-11T20:14:15.000Z', | ||
prival: 34, | ||
facilityval: 4, | ||
levelval: 2, | ||
facility: 'auth', | ||
level: 'crit', | ||
version: 1, | ||
@@ -41,0 +49,0 @@ type: 'RFC5424', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11087
7
211
58