Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

oakleon-syslog-parse

chrishiestand5MIT1.0.5

Parse syslog-format messages

syslog

readme

syslog-parse

Parse syslog-formatted messages.

Circle CI

Installation

$ npm install syslog-parse --save

Usage

var parse = require('syslog-parse');

var log = parse('<38>Feb 05 01:02:03 abc system[253]: Listening at 0.0.0.0:3000');

/*
log = {
  priority: 38,
  facilityCode: 4,
  facility: 'auth',
  severityCode: 6,
  severity: 'info',
  time: Thu Feb 05 2015 01:02:03 GMT+0100 (CET),
  host: 'abc',
  process: 'system',
  pid: 253,
  message: 'Listening at 0.0.0.0:3000'
}
*/

Tests

Circle CI

Run tests using:

$ npm test

License

WTFPL – Do What the Fuck You Want to Public License