Comparing version 0.0.1 to 0.0.2
@@ -40,37 +40,37 @@ var zlib = require('zlib'), | ||
graylog.prototype.emergency = function (short_message, full_message, additionalFields) { | ||
return this._log(short_message, full_message, additionalFields, this.level.EMERGENCY); | ||
graylog.prototype.emergency = function (short_message, full_message, additionalFields, timestamp) { | ||
return this._log(short_message, full_message, additionalFields, timestamp, this.level.EMERGENCY); | ||
}; | ||
graylog.prototype.alert = function (short_message, full_message, additionalFields) { | ||
return this._log(short_message, full_message, additionalFields, this.level.ALERT); | ||
graylog.prototype.alert = function (short_message, full_message, additionalFields, timestamp) { | ||
return this._log(short_message, full_message, additionalFields, timestamp, this.level.ALERT); | ||
}; | ||
graylog.prototype.critical = function (short_message, full_message, additionalFields) { | ||
return this._log(short_message, full_message, additionalFields, this.level.CRIT); | ||
graylog.prototype.critical = function (short_message, full_message, additionalFields, timestamp) { | ||
return this._log(short_message, full_message, additionalFields, timestamp, this.level.CRIT); | ||
}; | ||
graylog.prototype.error = function (short_message, full_message, additionalFields) { | ||
return this._log(short_message, full_message, additionalFields, this.level.ERROR); | ||
graylog.prototype.error = function (short_message, full_message, additionalFields, timestamp) { | ||
return this._log(short_message, full_message, additionalFields, timestamp, this.level.ERROR); | ||
}; | ||
graylog.prototype.warning = function (short_message, full_message, additionalFields) { | ||
return this._log(short_message, full_message, additionalFields, this.level.WARNING); | ||
graylog.prototype.warning = function (short_message, full_message, additionalFields, timestamp) { | ||
return this._log(short_message, full_message, additionalFields, timestamp, this.level.WARNING); | ||
}; | ||
graylog.prototype.warn = graylog.prototype.warning; | ||
graylog.prototype.notice = function (short_message, full_message, additionalFields) { | ||
return this._log(short_message, full_message, additionalFields, this.level.NOTICE); | ||
graylog.prototype.notice = function (short_message, full_message, additionalFields, timestamp) { | ||
return this._log(short_message, full_message, additionalFields, timestamp, this.level.NOTICE); | ||
}; | ||
graylog.prototype.info = function (short_message, full_message, additionalFields) { | ||
return this._log(short_message, full_message, additionalFields, this.level.INFO); | ||
graylog.prototype.info = function (short_message, full_message, additionalFields, timestamp) { | ||
return this._log(short_message, full_message, additionalFields, timestamp, this.level.INFO); | ||
}; | ||
graylog.prototype.log = graylog.prototype.info; | ||
graylog.prototype.debug = function (short_message, full_message, additionalFields) { | ||
return this._log(short_message, full_message, additionalFields, this.level.DEBUG); | ||
graylog.prototype.debug = function (short_message, full_message, additionalFields, timestamp) { | ||
return this._log(short_message, full_message, additionalFields, timestamp, this.level.DEBUG); | ||
}; | ||
graylog.prototype._log = function log(short_message, full_message, additionalFields, level) { | ||
graylog.prototype._log = function log(short_message, full_message, additionalFields, timestamp, level) { | ||
@@ -83,3 +83,3 @@ var payload, | ||
version : '1.0', | ||
timestamp : new Date().getTime() / 1000 >> 0, | ||
timestamp : (timestamp || new Date()).getTime() / 1000, | ||
host : this.hostname, | ||
@@ -86,0 +86,0 @@ facility : this.facility, |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"author": "Marc Trudel-Belise", | ||
@@ -11,0 +11,0 @@ "engines": { |
@@ -6,3 +6,4 @@ var graylog = require('./graylog'), | ||
servers = [ | ||
{ 'host': '127.0.0.1', 'port': 12201 } | ||
{ 'host': '192.168.100.85', 'port': 12201 }, | ||
{ 'host': '192.168.100.86', 'port': 12201 } | ||
]; | ||
@@ -22,2 +23,3 @@ | ||
client.error('test3', 'i get this3', {cool: 'beans'}); | ||
client.error('customTime', 'i get this3', {cool: 'beans'}, new Date('2012-10-10 13:20:31.619Z')); | ||
console.log(''); | ||
@@ -24,0 +26,0 @@ |
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
1657531
339