New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hologger-local

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hologger-local - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

29

lib/local-streamer.js

@@ -17,4 +17,4 @@ var Streamer = require("hologger-streamer");

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;
this._logLevels = ["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"];
this._minLogLevel = process.env.HOLOGGER_LOCAL_LOG_LEVEL || this._minLogLevel || 0;

@@ -43,12 +43,23 @@ this._debugDrain = console.log;

* @description
* Sobreescribe el metodo homonimo de la clase `Streamer`, permitiendo cribar los
* logs por un nivel minimo de serveridad.
*
* Sobreescribe el metodo homonimo de la clase {Streamer}.
*
* @param {} outlet
* @param {Mixed} info
* Puesto que en entornos de desarrollo (development) solo se loguea un
* mensaje que resume el evento (al contrario que en pre-produccion y en
* produccion, donde se almacena como JSON toda la informacion del mismo),
* en los casos en que el evento contenga un Object de tipo Error, ademas
* del slug se loguea explicitamente el stack del Error, pues de otro modo se
* pierde la informacion contenida en el mismo, vital para la depuracion
* del mismo.
*
*
* @param {Function} outlet Canal a traves del cual se producira el
* volcado de datos. Debe tratarse por ello de un metodo o {Function} encargado
* de la escritura de datos; es decir, que dada una informacion, produzca a su
* invocacion el registro en algun soporte. Vgr, el metodo `log` de la API
* `console` (`console.log`). Required.
* @param {Mixed} info
*/
LocalStreamer.prototype._log = function(outlet, info){
if ( this.logLevels.indexOf(info.severity) < this.minLogLevel ) return;
//else:
if (this._logLevels && this._logLevels.indexOf(info.severity) < this._minLogLevel) return;
//else
if (info && info.slug) outlet(info.slug);

@@ -55,0 +66,0 @@ if (info && info.err) {

{
"name": "hologger-local",
"version": "1.0.0",
"version": "1.1.0",
"description": "Local Streamer for Hologger",

@@ -16,3 +16,3 @@ "main": "index.js",

"dependencies": {
"hologger-streamer": "^1.0.0"
"hologger-streamer": "^1.2.0"
},

@@ -19,0 +19,0 @@ "scripts": {

# hologger-local
Azure Local Streamer for Hologger
Local Streamer for Hologger

@@ -20,3 +20,3 @@

```bash
LOCAL_LOG_LEVEL=
HOLOGGER_LOCAL_LOG_LEVEL=
```

@@ -23,0 +23,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc