Skip to content

Instantly share code, notes, and snippets.

@hungryblank
Created November 15, 2012 14:49
Show Gist options
  • Save hungryblank/4078991 to your computer and use it in GitHub Desktop.
Save hungryblank/4078991 to your computer and use it in GitHub Desktop.
Client.prototype.rawLog = function(severity, message, callback) {
var buffer = new Buffer(message(severity, this.facility, message));
this.socket.send(buffer, 0, buffer.length, this.port, this.host, callback);
};
Client.prototype.emerg = function(message, callback) {
this.rawLog(facilities.LOG_EMERG, message, callback);
};
Client.prototype.alert = function(message, callback) {
this.rawLog(facilities.LOG_ALERT, message, callback);
};
Client.prototype.crit = function(message, callback) {
this.rawLog(facilities.LOG_CRIT, message, callback);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment