Enhanced Console Logs In JavaScript – logger.js

Category: Javascript | June 9, 2020
Author:RodrigoWebDev
Views Total:171 views
Official Page:Go to website
Last Update:June 9, 2020
License:MIT

Preview:

Enhanced Console Logs In JavaScript – logger.js

Description:

logger.js is a small JavaScript library designed for developers to output various types of logs in the browser console.

Supported log types:

  • Error
  • Info
  • Log
  • Warn
  • Table
  • Count
  • Group
  • Time
  • Trace

How to use it:

1. Load the minified version of the logger.js from the dist folder.

<script src="dist/logger.js"></script>

2. Create custom console logs.

log('Hello World!');
error('Hello World!');
info('Hello World!');
warn('Hello World!');

3. More commands.

assert(expression, message);
count(label);
group(label);
groupCollapsed(label);
groupEnd();
table(tabledata, tablecolumns);
time(label);
timeEnd(label);
trace(label);

4. Clear all console logs.

console.clear();

You Might Be Interested In:


Leave a Reply