hologger-local
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -13,4 +13,5 @@ var Streamer = require("hologger-streamer"); | ||
* | ||
* @param {Object} library: libreria de codigos empleada | ||
* @param {Nomber} isil: identificador numerico de la libreria de codigos empleada | ||
* @param {Object} library libreria de codigos empleada | ||
* @param {Nomber} isil identificador numerico de la libreria de | ||
* codigos empleada | ||
*/ | ||
@@ -22,2 +23,4 @@ function LocalStreamer(library, isil){ | ||
this._description = "LocalStreamer constructor"; | ||
this._logLevels = ["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]; | ||
this._minLogLevel = process.env.LOCAL_LOG_LEVEL || process.env.HOLOGGER_LOG_LEVEL || 0; | ||
@@ -37,3 +40,3 @@ this._debugDrain = console.log; | ||
/////// INHERITS FROM STREAMER | ||
////// INHERITS FROM STREAMER | ||
LocalStreamer.prototype = Object.create(Streamer.prototype); | ||
@@ -45,3 +48,25 @@ LocalStreamer.prototype.constructor = Streamer; | ||
/////// MODULE EXPORTS | ||
/** | ||
* @description | ||
* Sobreescribe el metodo homonimo de la clase `Streamer`. | ||
* | ||
* | ||
* @param {} gate | ||
* @param {Mixed} info | ||
*/ | ||
LocalStreamer.prototype._log = function(gate, info){ | ||
if ( this._logLevels.indexOf(info.severity) < this._minLogLevel ) return; | ||
//else: | ||
if (info && info.slug) gate(info.slug); | ||
if (info && info.err) { | ||
gate("====================ERR STACK BEGINS==================="); | ||
gate(info.err.stack); | ||
gate("====================ERR STACK ENDS==================="); | ||
} | ||
}; | ||
////// MODULE EXPORTS | ||
module.exports = exports = LocalStreamer; |
{ | ||
"name": "hologger-local", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Local Streamer for Hologger", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -22,2 +22,4 @@ # hologger-local | ||
HOLOGGER_RBFS= | ||
HOLOGGER_LOG_LEVEL= | ||
LOCAL_LOG_LEVEL= | ||
``` | ||
@@ -24,0 +26,0 @@ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
5514
58
79
2