New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

good-hapi-graylog2

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

good-hapi-graylog2 - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

22

lib/index.js

@@ -5,2 +5,13 @@ const Stream = require('stream');

function removeTimestamp(classInstance) {
var jsonedObject = {};
for (var x in classInstance) {
if (x === "constructor" || x === "timestamp") {
continue;
}
jsonedObject[x] = classInstance[x];
}
return jsonedObject;
}
class GoodHapiGraylog extends Stream.Writable {

@@ -13,3 +24,3 @@ constructor({ host, port, facility, hostname, adapter = 'udp' }) {

this.log = log.setConfig({
fields: { facility },
fields: { facility, host:hostname },
adapterName: adapter,

@@ -20,7 +31,8 @@ adapterOptions: {

}
});
});
}
_write(data, encoding, callback) {
const dataString = CircularJSON.stringify(data);
this.log.info(dataString);
const dataString = CircularJSON.parse(CircularJSON.stringify(removeTimestamp(data)));
const message = (dataString.description) ? dataString.description : 'None';
this.log.info(message, dataString );
callback();

@@ -30,2 +42,2 @@ }

module.exports = GoodHapiGraylog;
module.exports = GoodHapiGraylog;
{
"name": "good-hapi-graylog2",
"version": "1.1.0",
"version": "1.2.0",
"repository": "git://github.com/gleip/good-hapi-graylog2",

@@ -11,3 +11,4 @@ "description": "Graylog GELF broadcasting for Good process monitor",

"circular-json": "^0.3.3",
"gelf-pro": "^1.2.0"
"gelf-pro": "^1.2.2",
"stream": "0.0.2"
},

@@ -22,3 +23,3 @@ "devDependencies": {

"peerDependencies": {
"good": "7.x.x"
"good": ">=7"
},

@@ -25,0 +26,0 @@ "engines": {

@@ -42,2 +42,3 @@ # good-hapi-graylog2

bufferSize: '<your buffer size>' // optional, default 1400
adapter: '<protocol udp or tcp>' // optional, default udp
}],

@@ -44,0 +45,0 @@ }],

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