residue-winston
Advanced tools
Comparing version 1.0.13 to 1.0.14
11
index.js
@@ -20,3 +20,3 @@ // | ||
const Residue = function(options) { | ||
const Residue = module.exports = function(options) { | ||
if (!options) { | ||
@@ -30,2 +30,3 @@ throw "Please provide residue-node options"; | ||
TransportStream.call(this, options); | ||
if (options.config_file) { | ||
@@ -36,5 +37,6 @@ residue_internal.loadConfiguration(options.config_file); | ||
} | ||
residue_internal.connect(); | ||
this.logger = residue_internal.getLogger(options.logger_id); | ||
this.logger.log_sources = options.log_sources || { | ||
this.logger.log_sources = { | ||
base_idx: this.logger.log_sources.base_idx + (options.log_source_layer_count || 6), | ||
@@ -57,7 +59,7 @@ getSourceFile: this.logger.log_sources.getSourceFile, | ||
// Winston Transport Function | ||
Residue.prototype.log = function(arg1, arg2) { | ||
Residue.prototype.log = function(arg1, arg2, meta, cb) { | ||
const level = typeof arg1 === 'string' ? arg1 : arg1.level; | ||
const msg = typeof arg2 === 'string' ? arg2 : arg1.message; | ||
const callback = typeof arg2 === 'function' ? arg2 : null; | ||
const callback = typeof arg2 === 'function' ? arg2 : cb; | ||
@@ -95,3 +97,2 @@ switch (level) { | ||
module.exports.residue = Residue; | ||
module.exports.residue_internal = residue_internal; |
{ | ||
"name": "residue-winston", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "Winston transport for Residue", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
5678
78