[Javascript] console.js

A javascript tool to runtime capture console logs across multiple devices and browsers

Table of Contents


Story Time

Not much to tell. I was working on a notification / TTS API example.

If you haven't tried to create a cross-browser TTS system or a notification API, maybe you cannot see the utility. But trust me, to test multiple browser in multiple platforms, this is the way.


How to Import

You can host on your server an call it inside the <head> tag:
  <script src="console.js"></script>

You can also import the original or minified "-min" from a third-party (GitHub) inside the <head> tag
  <script src="https://jonnypaes.github.io/console.js/console-min.js"></script>

And last but not least, you can use a minified version from JSDelivr (Recommended):
  <script src="https://cdn.jsdelivr.net/gh/jonnypaes/console.js/console-min.js"></script>

How to Trigger

Simply add "?console=true" at the end of the url and you will trigger the console
https://jonnypaes.github.io/console.js/?console=true

Mockup

This is the interface that will be placed on top of your page
Welcome to console.js!
🟢 This is a log message!
🟡 This is a warning!
🔴 Error: This is an error!
FunctionFileLineColumn
<anonymous>console.js1521
🔵 This is an informational message.
This is a debug message.

Preview

⚠️ Attention! Software stage - Beta


Open in a new tab

State

Done

  • Show file content inside a virtual object
  • Highlights the line inside the virtual object
  • Capture logs from header and body

Partially Done

  • error stack parser kinda buggy


On github.

Peace✌️

Popular posts from this blog