Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nsyslog-parser

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nsyslog-parser - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

pri.js

2

package.json
{
"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',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc