New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@voiceflow/logger

Package Overview
Dependencies
Maintainers
18
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@voiceflow/logger

Common logger for Voiceflow backend microservices

  • 1.5.4
  • npm
  • Socket score

Version published
Weekly downloads
818
increased by21.36%
Maintainers
18
Weekly downloads
 
Created
Source

circle ci Coverage Quality Gate Status

logger

Author: Frank Gu <frank@voicelfow.com> Date: Dec 11, 2019

A logging package for VERY fast and useful JSON logging.

  • All log entries go to process.stdout
  • Minimal overhead and no logger hierarchies
  • Multiple instantiations allowed

Usage

const Logger = require('@voiceflow/logger').default;
// or
import Logger from '@voiceflow/logger';

const defaultOptions = {
  level: 'info',
  pretty: false,
};

const overrideOptions = {
  level: 'trace', // Minimum log-level to be printed
  pretty: true, // Pretty print
};

const defaultLogger = new Logger(); // Default options
const customLogger = new Logger(overrideOptions);

defaultLogger.trace('this is a trace');
defaultLogger.debug('this is a debug');
defaultLogger.info('this is an info');
defaultLogger.warn('this is a warning');
defaultLogger.error('this is an error');
defaultLogger.fatal('this is a fatal');

customLogger.trace('this is a trace');
customLogger.debug('this is a debug');
customLogger.info('this is an info');
customLogger.warn('this is a warning');
customLogger.error('this is an error');
customLogger.fatal('this is a fatal');

Development Assitance

  • For warn logs, the calling function and line number is included
  • For error and fatal logs, the full call-stack is included

Pretty Printing

Pretty printing will add colors, parse unix epoch timestamps into UTC time.

Keywords

FAQs

Package last updated on 01 Jun 2021

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