Permalink
Browse files

Renaming internals of producer to make parser.

  • Loading branch information...
1 parent d3165c3 commit 41ac4a2b5e4e8efe424621da0c4ad29c36201d6b @squeeks committed Mar 7, 2013
Showing with 12 additions and 12 deletions.
  1. +12 −12 lib/glossy/produce.js
View
24 lib/glossy/produce.js
@@ -91,7 +91,7 @@ var BSDDateIndex = [
/*
- * SyslogProduce class
+ * GlossyProducer class
* @param {Object} provides persistent details of all messages:
* facility: The facility index
* severity: Severity index
@@ -100,9 +100,9 @@ var BSDDateIndex = [
* pid: Process ID
* msgID: Message ID (RFC5424 only)
* type: RFC3164/RFC5424 message type
- * @return {Object} SyslogProduce object
+ * @return {Object} GlossyProducer object
*/
-var SyslogProduce = function(options) {
+var GlossyProducer = function(options) {
if(options && typeof options =='object' && options.type) {
this.type = options['type'].match(/bsd|3164/i) ? "RFC3164" : "RFC5424";
} else if(options && typeof options == 'string') {
@@ -139,7 +139,7 @@ var SyslogProduce = function(options) {
* @param {Function} callback a callback run once the message is built
* @return {String} compiledMessage on completion, false on failure
*/
-SyslogProduce.prototype.produce = function(options, callback) {
+GlossyProducer.prototype.produce = function(options, callback) {
var msgData = new Array();
if(!options.date instanceof Date) {
@@ -216,7 +216,7 @@ SyslogProduce.prototype.produce = function(options, callback) {
* @param {Function} callback a callback run once the message is built
* @return {String} compiledMessage on completion, false on failure
*/
-SyslogProduce.prototype.debug = function(options, callback) {
+GlossyProducer.prototype.debug = function(options, callback) {
options.severity = 'debug';
return this.produce(options, callback);
};
@@ -228,7 +228,7 @@ SyslogProduce.prototype.debug = function(options, callback) {
* @param {Function} callback a callback run once the message is built
* @return {String} compiledMessage on completion, false on failure
*/
-SyslogProduce.prototype.info = function(options, callback) {
+GlossyProducer.prototype.info = function(options, callback) {
options.severity = 'info';
return this.produce(options, callback);
};
@@ -240,7 +240,7 @@ SyslogProduce.prototype.info = function(options, callback) {
* @param {Function} callback a callback run once the message is built
* @return {String} compiledMessage on completion, false on failure
*/
-SyslogProduce.prototype.notice = function(options, callback) {
+GlossyProducer.prototype.notice = function(options, callback) {
options.severity = 'notice';
return this.produce(options, callback);
};
@@ -252,7 +252,7 @@ SyslogProduce.prototype.notice = function(options, callback) {
* @param {Function} callback a callback run once the message is built
* @return {String} compiledMessage on completion, false on failure
*/
-SyslogProduce.prototype.warn = function(options, callback) {
+GlossyProducer.prototype.warn = function(options, callback) {
options.severity = 'warn';
return this.produce(options, callback);
};
@@ -264,7 +264,7 @@ SyslogProduce.prototype.warn = function(options, callback) {
* @param {Function} callback a callback run once the message is built
* @return {String} compiledMessage on completion, false on failure
*/
-SyslogProduce.prototype.crit = function(options, callback) {
+GlossyProducer.prototype.crit = function(options, callback) {
options.severity = 'crit';
return this.produce(options, callback);
};
@@ -276,7 +276,7 @@ SyslogProduce.prototype.crit = function(options, callback) {
* @param {Function} callback a callback run once the message is built
* @return {String} compiledMessage on completion, false on failure
*/
-SyslogProduce.prototype.alert = function(options, callback) {
+GlossyProducer.prototype.alert = function(options, callback) {
options.severity = 'alert';
return this.produce(options, callback);
};
@@ -288,7 +288,7 @@ SyslogProduce.prototype.alert = function(options, callback) {
* @param {Function} callback a callback run once the message is built
* @return {String} compiledMessage on completion, false on failure
*/
-SyslogProduce.prototype.emergency = function(options, callback) {
+GlossyProducer.prototype.emergency = function(options, callback) {
options.severity = 'emergency';
return this.produce(options, callback);
};
@@ -442,5 +442,5 @@ function generateStructuredData(struct) {
}
if(typeof module == 'object') {
- module.exports = SyslogProduce;
+ module.exports = GlossyProducer;
}

0 comments on commit 41ac4a2

Please sign in to comment.