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

clix-logger

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clix-logger

Another console log wrapper with colored support and icons

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1K
increased by69.54%
Maintainers
1
Weekly downloads
 
Created
Source

NPM Version Build Status

clix-logger

Another console log wrapper with colored support and icons

Install

npm i -g clix-logger

Usage

var options = {
  // Will print the messages using chalk colors. default is false
  coloredOutput: false,
  // Will suppress the output of `subtle` and `log` methods
  // all of the others will still be printed
  quiet: false // default is false,
};
var logger = require('clix-logger')(options);
logger.log('some', 'message', 'here');

methods

  • ok(arg1[, arg2, ...argn] )
  • subtle(arg1[, arg2, ...argn] )
  • log(arg1[, arg2, ...argn] )
  • success(arg1[, arg2, ...argn] )
  • error(arg1[, arg2, ...argn] )
  • print(arg1[, arg2, ...argn] )

NOTES:

  • All the methods above use console.log to print the messages, except the error one, which uses console.error.
  • subtle and log are suppressed when options.quiet is specified.
  • print does not have an icon at the beginning of the line

Example

the following code

var logger = require('clix-logger')({ coloredOutput: true });

# will use yellow color
logger.ok( 'a', 'simple', 'message', 'of', 'type', 'ok', {
  coloredOutput: false
}, [ 1, 2, 3 ] );

# will use white color
logger.subtle( 'a', 'simple', 'message', 'of', 'type', 'subtle', {
  coloredOutput: false
}, [ 1, 2, 3 ] );

# will use white color
logger.log( 'a', 'simple', 'message', 'of', 'type', 'log', {
  coloredOutput: false
}, [ 1, 2, 3 ] );

# will use red color
logger.error( 'a', 'simple', 'message', 'of', 'type', 'error', {
  coloredOutput: false
}, [ 1, 2, 3 ] );

# will use gray color
logger.print( 'a', 'simple', 'message', 'of', 'type', 'print', {
  coloredOutput: false
}, [ 1, 2, 3 ] );

# will use green color
logger.success( 'a', 'simple', 'message', 'of', 'type', 'success', {
  coloredOutput: false
}, [ 1, 2, 3 ] );

Will produce this output:

screenshot

License

MIT

Changelog

Changelog

Keywords

FAQs

Package last updated on 11 Aug 2015

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