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
738
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.16.30-beta-958ae719
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.3K
increased by190.34%
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.

Rotate log files

Rotate log files every day, log filename formate {label}-YYYY-MM-DD.log.

[!Important] Default retained log files

Because it is for internal use, the default log is kept for 60 days.

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 08 Aug 2024

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