New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

hof-logger

Package Overview
Dependencies
Maintainers
4
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hof-logger

Common logger pattern

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
4
Created
Source

hof-logger

Common logger pattern

Installation

$ npm install hof-logger --save

Usage

hof-logger exports a function which you can call to access a winston logger instance.

var logger = require('hof-logger')();

logger.info('A message');

Options

Options can be passed and take the form of the following example

var createLogger = require('hof-logger');
var logger = createLogger({
  levels: {
    info: 0,
    email: 1,
    warn: 2,
    error: 3
  },
  colours: {
    info: 'green',
    email: 'magenta',
    warn: 'yellow',
    error: 'red'
  },
  transportOptions: {
    json: true,
    timestamp: true,
    colorize: true,
    stringify: JSON.stringify
  }
});

FAQs

Package last updated on 05 Jun 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