🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

module-log

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

module-log

Logger for Individual Node.js Module(s)

1.0.1
latest
Source
npm
Version published
Weekly downloads
318
-40.67%
Maintainers
1
Weekly downloads
 
Created
Source

module-log

Logger for Individual Node.js Module(s)

Travis Codecov Commitizen friendly npm

The idea is that you can set up the name of the module and use pre-defined logging functionalities for each individual module. In terminal window, the output of log statements is going to be according to file (or module) name(s).

Enhancement over normal ol' console.log().

Installation

$ npm install module-log --save

Usage

const log = require('module-log');

log.setFileName('server.js');
log.log('testing');
log.error('An error occurred!!!');

API

  • setFileName
    • To set File name of the module to show in console on every log output.
  • log
  • debug
  • error
  • warn
  • info

FAQs

Package last updated on 01 Mar 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