🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

sir-logalot

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

sir-logalot

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

1.0.1
latest
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 23 Nov 2017

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