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

signale

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

signale

👋 Hackable console logger

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
981K
decreased by-43.42%
Maintainers
1
Weekly downloads
 
Created

What is signale?

The signale npm package is a console logger with various levels of importance, from debugging to fatal errors. It provides an easy way to display colorful and styled log messages in the console. It is designed to be both beautiful and powerful, with custom and configurable loggers.

What are signale's main functionalities?

Customizable Loggers

Allows users to create custom loggers with specific configurations, badges, colors, and labels.

const { Signale } = require('signale');
const options = {
  disabled: false,
  interactive: false,
  logLevel: 'info',
  secrets: [],
  stream: process.stdout,
  types: {
    remind: {
      badge: '**',
      color: 'yellow',
      label: 'reminder',
      logLevel: 'info'
    },
    santa: {
      badge: '🎅',
      color: 'red',
      label: 'santa',
      logLevel: 'info'
    }
  }
};
const custom = new Signale(options);
custom.remind('Remember to check your logs!');
custom.santa('Ho Ho Ho! Merry Christmas!');

Predefined Loggers

Provides a set of predefined loggers for common logging levels such as success, error, warning, info, and debug.

const signale = require('signale');
signale.success('Operation successful');
signale.error('Something went wrong');
signale.warn('Warning message');
signale.info('Information message');
signale.debug('Debugging message');

Interactive Mode

Enables interactive logging, which can be useful for tasks that have a duration, such as pending operations that eventually succeed or fail.

const { Signale } = require('signale');
const interactive = new Signale({ interactive: true, scope: 'custom' });
interactive.pending('Running task');
setTimeout(() => {
  interactive.success('Task completed');
}, 1000);

Scoped Loggers

Allows the creation of scoped loggers that prefix their output with a given scope, making it easier to distinguish logs from different parts of an application.

const { Signale } = require('signale');
const tasks = new Signale({ scope: 'tasks' });
tasks.info('Starting tasks...');
tasks.complete('All tasks completed!');

Other packages similar to signale

FAQs

Package last updated on 16 May 2018

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