loggin-js-badges

0.0.1 • Public • Published

cli-badges plugin for Loggin'JS

NPM version Downloads Dependencies Known Vulnerabilities
NPM quality

`cli-badges` for Loggin'JS.


!! NOTICE !!

This plugin is still in it's early stages, and the API may change or have errors. If you find any errors or have sugestions please leave an issue


Table Of Content

Installing

  • Install with npm
npm install loggin-js-badges --save

Importing

// Require the logging library
const loggin = require('loggin-js');
 
// Require the express middleware
const logginBadges = require('loggin-js-badges');

Usage

// Register the plugin
loggin.use(logginBadges);
 
const logger = loggin.logger();
 
logger.badge('test', 'badge');

You can log to a specific notifier:

logger.badge.only('console', 'test', 'badge', { labelBg: 'red' });

Available Options

Check out docs for cli-badges here. Api is mostly the same.

Option Description Type Default
messageBg Background color for the label string or number blue
labelBg Background color for the message string or number blackBright
messageColor Text color for the message string or number white
labelColor Text color for the label string or number white
labelWidth Width of the label number label length + 2
messageWidth Width of the message number label length + 2
labelStyle Style for the label text string null
messageStyle Style for the label text string null
link Add a link when a badge is clicked (only works in some terminals, see this) URL null
forceLink Force adding link even if not supported boolean false

Found a bug?

If you found a bug or like to leave a feature request, please leave an issue and we will take care of it.

Just make sure it's not already filed.

Collaborating

Hi there, if you like the project don't hesitate in collaborating (if you like to), submit a pull request, post an issue, ...
Any help or ideas are apreciated!

Readme

Keywords

none

Package Sidebar

Install

npm i loggin-js-badges

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

6.8 kB

Total Files

4

Last publish

Collaborators

  • logginjs