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

@digitalronin/logger

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

@digitalronin/logger

Console logger for node and browser environment

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@digitalronin/logger

NPM npm (scoped) Build Status

A simple wrapper for console.log for Node or browser. The former supports colors, using chalk Link

Installation

# Using Yarn
> yarn add @digitalronin/logger --dev

# Using NPM
> npm install @digitalronin/logger -D

Usage

Browser

const Logger = require('@digitalronin/logger');
const l = new Logger();

// console.log
l.log('Test log');

// console.error
l.error('Test error');

// console.log
l.info('Test info');

Node

const Logger = require('@digitalronin/logger');
const l = new Logger();

// console.log in white
l.log('Test log');

// console.log in red
l.error('Test error');

// console.log in blue
l.info('Test info');
Overwriting default colors

Only the following colors is supported

const Logger = require('@digitalronin/logger');
const l = new Logger({
  error: 'blue',
  info: 'white',
  log: 'green',
});

Keywords

FAQs

Package last updated on 16 Apr 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