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

@abtnode/logger

Package Overview
Dependencies
Maintainers
3
Versions
744
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abtnode/logger

ABT Node logger lib

  • 1.0.39
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
decreased by-69.4%
Maintainers
3
Weekly downloads
 
Created
Source

logger

This is a log library for ABT Node.

Enable logging first

Set the environments: process.env.ABT_NODE_LOG_DIR = {logging directory}.

Write to files

Set the environments: process.env.NODE_ENV = 'production'.

Writing to console

DEBUG=@abtnode/* npm run xxx.

Or, the logs will be write to stdout.

Usage

const logger = require('@abtnode/logger')('@abtnode/cli');

// log info
logger.info('detail blocklet', { did: 'z8iZpWP3gto8RWk9UHfvAaYtqX5wZ3Mz9BrHA' });
// [2020-08-12 17:26:28] [info]  "detail blocklet" {"did":"z8iZpWP3gto8RWk9UHfvAaYtqX5wZ3Mz9BrHA"}

// log error: must pass an object
logger.info('this is an error', { error: new Error('test') });

Keywords

FAQs

Package last updated on 29 Nov 2020

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