megalog
v0.1.0
Published
Output messages to the console in big blocks; for when you really need something to be noticed.
Downloads
14
Maintainers
Readme
MEGALOG
Output messages to the console in big blocks; for when you really need to tell someone something.
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.");
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 colourbgColour
/bgColor
background colourcodeColour
/codeColor
highlight colour for inline code
megalog.log("Mmmmm nice: `rm -rf`", {
colour: 'yellow',
bgColour: 'green',
codeColour: 'magenta'
});
Build
$ npm install
$ npm run build