gelf-stream
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -1,4 +0,4 @@ | ||
var split = require('split') | ||
, bunyan = require('bunyan') | ||
, gelfStream = require('./') // require('gelf-stream') | ||
var split = require('split'), | ||
bunyan = require('bunyan'), | ||
gelfStream = require('./') // require('gelf-stream') | ||
@@ -5,0 +5,0 @@ // gelf-stream comes with Bunyan support |
@@ -18,4 +18,4 @@ var gelfStream = exports | ||
var client = gelfling(host, port, options) | ||
, stream = new Stream() | ||
var client = gelfling(host, port, options), | ||
stream = new Stream() | ||
@@ -49,6 +49,6 @@ client.errHandler = function(err) { | ||
case 30 /*bunyan.INFO*/: return gelfling.INFO | ||
case 40 /*bunyan.WARN*/: return gelfling.WARN | ||
case 40 /*bunyan.WARN*/: return gelfling.WARNING | ||
case 50 /*bunyan.ERROR*/: return gelfling.ERROR | ||
case 60 /*bunyan.FATAL*/: return gelfling.EMERGENCY | ||
default: return gelfling.WARN | ||
default: return gelfling.WARNING | ||
} | ||
@@ -74,6 +74,7 @@ } | ||
function bunyanToGelf(log) { | ||
var errFile, key | ||
, ignoreFields = ['hostname', 'time', 'msg', 'name', 'level', 'v'] | ||
, flattenedLog = flatten(log) | ||
, gelfMsg = { | ||
/*jshint camelcase:false */ | ||
var errFile, key, | ||
ignoreFields = ['hostname', 'time', 'msg', 'name', 'level', 'v'], | ||
flattenedLog = flatten(log), | ||
gelfMsg = { | ||
host: log.hostname, | ||
@@ -80,0 +81,0 @@ timestamp: +new Date(log.time) / 1000, |
{ | ||
"name": "gelf-stream", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "A stream to send JS objects to a Graylog2 server (in GELF format)", | ||
@@ -5,0 +5,0 @@ "author": "Michael Hart <michael.hart.au@gmail.com> (http://github.com/mhart)", |
@@ -18,5 +18,5 @@ gelf-stream | ||
```javascript | ||
var split = require('split') | ||
, bunyan = require('bunyan') | ||
, gelfStream = require('gelf-stream') | ||
var split = require('split'), | ||
bunyan = require('bunyan'), | ||
gelfStream = require('gelf-stream') | ||
@@ -23,0 +23,0 @@ // gelf-stream comes with Bunyan support |
@@ -1,3 +0,3 @@ | ||
var should = require('should') | ||
, gelfStream = require('../') | ||
var should = require('should'), | ||
gelfStream = require('../') | ||
@@ -4,0 +4,0 @@ describe('gelf-stream', function() { |
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
6377
120