Socket
Socket
Sign inDemoInstall

sir-logalot

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sir-logalot

A dead simple, declarative logging library to spice up your development life.


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Install size
34.2 kB
Created
Weekly downloads
 

Readme

Source

sir-logalot

A dead simple, declarative Node.js logging library to spice up your development life.

Usage

npm install sir-logalot
const log = require('sir-logalot');

API

log.label(string, variable)

Prints an arrow between label and value of variable.

const friend = 'fred';
log.label('friend', friend); // prints: friend --> fred
log.divider()

Prints a string of stars to delineate breakpoints between logs.

for (let i = 0; i < 2; i += 1) {
  console.log('in outer loop');
  log.divider();
  for (let j = 0; j < 2; j += 1) {
    console.log('in inner loop');
  }
  log.divider();
}
/* prints:
in outer loop
⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️
in inner loop
in inner loop
⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️
in outer loop
⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️
in inner loop
in inner loop
⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️
*/

Symbols:

symbols

You may optionally provide a string as an argument to overwrite the default messages.

log.error([msg])
log.success([msg])
log.warning([msg])
log.info([msg])

ASCII Art:

You may optionally provide a string as an argument to overwrite the default messages.

log.frog([msg])

frog

log.cat([msg])

cat

log.cow([msg])

cow

Emojis:

log.emoji(key)
log.emoji('hamburger'); // prints: 🍔

For a full list of emoji key-value pairs, check out https://raw.githubusercontent.com/omnidan/node-emoji/master/lib/emoji.json

FAQs

Last updated on 23 Nov 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc