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

hologger

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hologger

Holistic logging library for NodeJS

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

hologger

Holistic logging library

Installation

$ npm install hologger

Environmental variables

RACK_ENV=
HOSTNAME=
PORT=
HOLOGGER_RIFS=
HOLOGGER_RBFS=
HOLOGGER_LOG_LEVEL=

Log Levels

Mirror that of syslog, but reversing ordering:

  • 8 EMERGENCY system unusable
  • 7 ALERT immediate action required
  • 6 CRITICAL condition critical
  • 5 ERROR condition error
  • 4 WARNING condition warning
  • 3 NOTICE condition normal, but significant
  • 2 INFO a purely informational message
  • 1 DEBUG debugging information

Use

La libreria permite su invocacion de cuatro formas indistintamente:

  • hologger(3, {foo: "bar"}) => la mas completa
  • hologger("some custom message") => para mensajes sobre la marcha
  • hologger({foo: "bar"}) => igualmente sobre la marcha, pero con info estructurada
  • hologger(Error) => logueo de errores

En cualquier caso, se generara un codigo de error que, dependiendo del nivel de logueo tendra la siguiente apariencia.

  • emergency; // 8xxxxxxx
  • alert; // 7xxxxxxx
  • critical; // 6xxxxxxx
  • error; // 5xxxxxxx
  • warning; // 4xxxxxxx
  • notice; // 3xxxxxxx
  • info; // 2xxxxxxx
  • debug; // 1xxxxxxx

CAVEATS

A fin de facilitar la operativa interna del logger, y de ser capaz de operar de la forma mas abstracta posible en el mayor numero de casos posible, hologger produce la estandarizacion interna del nombre de un numero de contado de propiedades de la informacion que se le presenta a logueo, siendo estas:

  • error => err
  • request => req

TODO

  • Agregar metodo useLibrary para configurar la libreria de codigos a usar (breaking)

@vid https://github.com/tj/log.js/blob/master/Readme.md
@vid https://github.com/nomiddlename/log4js-node

License

(The MIT License)

Copyright (c) 2014-2016 pekebuda;

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Package last updated on 28 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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