megalog

0.1.0 • Public • Published

MEGALOG

Output messages to the console in big blocks; for when you really need to tell someone something.

examples

Install

$ npm install --save megalog

Usage

API

megalog.method(string, [options]);

Examples

Use in place of console in node/io.js, in the four following scenarios:

var megalog = require('megalog');
 
megalog.log("Process complete");
megalog.info("Everthing is looking good.");
megalog.warn("You should check something…");
megalog.error("Something has gone wrong.");

Markdown-style inline code snippets will be hightlighted:

megalog.error("`grunt kill-website` has been removed.");

example with inline code

Options

You can override the defaults with an optional parameters object, as a second argument:

  • heading adds or overides the heading

MEGALOG uses chalk. You can override the colour presets by passing in other chalk colours:

  • colour/color text colour
  • bgColour/bgColor background colour
  • codeColour/codeColor highlight colour for inline code
megalog.log("Mmmmm nice: `rm -rf`", {
    colour: 'yellow',
    bgColour: 'green',
    codeColour: 'magenta'
});

example with overides

Build

$ npm install
$ npm run build

Package Sidebar

Install

npm i megalog

Weekly Downloads

32

Version

0.1.0

License

ISC

Last publish

Collaborators

  • sndrs