Enhance Console Logs With Pure JavaScript – Badgee

Category: Javascript | January 27, 2020
Views Total:207 views
Official Page:Go to website
Last Update:January 27, 2020


Enhance Console Logs With Pure JavaScript – Badgee


Badgee is a JavaScript library to enhance & improve the default browser console logs with custom badges and styles.

How to use it:

Install the Badgee via NPM.

npm install --save badgee

Import the Badgee into your project.

import badgee from 'badgee';

Or directly include the JavaScript file ‘badgee.umd.js’ on the webpage.

<script src="build/badgee.umd.js"></script>

Show a basic message in the console log.

badgee.log('Text here...');

Config the console log.

  // If set to false, logs will no longer be displayed to the console.
  enabled: true,
  // If set to false, label prefixes will be displayed with default output style. 
  styled: false

Add custom badges to the console logs.

var myBadge = badgee.define('Badge Name', 'green');
myBadge.log('hello badge defined!');

Apply your own CSS styles to the console logs.

  // CSS styles here


v3.0.0 (01/27/2020)

  • Remove IE9 patch

v2.0.5 (07/26/2019)

  • update

v2.0.4 (07/25/2019)

  • avoid breaking on IE9

You Might Be Interested In:

Leave a Reply