Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hf-node-logger

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hf-node-logger

A logger module with loglevels

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

hf-node-logger

Laser Fox Logger Module for Node

laserfox

Installation

simple installation

npm install hf-node-logger

require it in your file

var logger = require('hf-node-logger')();

Loglevel

There are multiple loglevel:

  1. debug

For debugging information 2. info

For the 'normal' stream of events 3. warning

For things which are uncritical but someone should have a look 4. severe

For things that should not happen 5. critical

For things that are breaking the System

configuration

Require the module and define your loglevel.

  var config = {
    stdOut : console.log,
    errOut : console.error,
    level  : DEBUG,
    name   : 'AppLog'
  };

and call the initializer which is returned by the require statement

var logger = require('hf-node-logger')(config);

If you don't specify any, the default loglevel is 'info'.

usage

generic use:

  logger.log(<LOGLEVEL>, <LOGTEXT>);

result:

  <TIMESTAMP> | <NAME> | <LOGLEVEL> | <LOGTEXT>

Shortcuts

There are specified shortcuts for every loglevel:

debug

  logger.debug(<LOGTEXT>);

info

  logger.info(<LOGTEXT>);

warning

  logger.warning(<LOGTEXT>);

severe

  logger.severe(<LOGTEXT>);

critical

  logger.critical(<LOGTEXT>);

Keywords

FAQs

Package last updated on 28 Jan 2016

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