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

gelf-stream

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gelf-stream - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

6

example.js

@@ -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() {

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