Comparing version 0.1.0 to 0.1.1
@@ -65,3 +65,3 @@ var zlib = require('zlib'), | ||
graylog.prototype.emergency = function (short_message, full_message, additionalFields, timestamp) { | ||
return this._log(short_message, full_message, additionalFields, timestamp, this.level.EMERGENCY); | ||
return this._log(short_message, full_message, additionalFields, timestamp, this.level.EMERG); | ||
}; | ||
@@ -113,3 +113,10 @@ | ||
if (typeof(short_message) !== 'object') { | ||
if (typeof(short_message) !== 'object' && typeof(full_message) === 'object' && additionalFields === undefined) { | ||
// Only short message and additional fields are available | ||
message.short_message = short_message; | ||
message.full_message = short_message; | ||
additionalFields = full_message; | ||
} | ||
else if (typeof(short_message) !== 'object') { | ||
// We normally set the data | ||
@@ -116,0 +123,0 @@ message.short_message = short_message; |
{ | ||
"name": "graylog2", | ||
"description": "Graylog2 client library for node.js", | ||
"homepage": "http://egorfine.github.com/node-graylog", | ||
"homepage": "http://github.com/Wizcorp/node-graylog2", | ||
"bugs": { | ||
"url": "http://github.com/Wizcorp/node-graylog2/issues" | ||
}, | ||
"version": "0.1.0", | ||
"author": "Marc Trudel-Belisle", | ||
"version": "0.1.1", | ||
"author": "Marc Trudel-Belise", | ||
"engines": { | ||
@@ -11,0 +11,0 @@ "node": ">=0.6.11" |
10
test.js
@@ -43,2 +43,12 @@ var graylog = require('./graylog'), | ||
console.log('---------------------------------------------'); | ||
console.log('Sending different parameters'); | ||
console.log('---------------------------------------------'); | ||
client.log('ParametersTest - Only short message'); | ||
client.log('ParametersTest - Short message and json', {cool: 'beans'}); | ||
client.log('ParametersTest - Short message and full message', 'Full message'); | ||
client.log('ParametersTest - Short Message with full message and json', 'Full message', {cool: 'beans'}); | ||
console.log(''); | ||
console.log('Insertion complete. Please check', 'http://' + servers[0].host + ':3000', 'and verify that insertion was successfull'); | ||
@@ -45,0 +55,0 @@ console.log(''); |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
345133
242
1