loggrr

0.0.2 • Public • Published

loggrr

NPM

Travis build status Dependency Status devDependency Status npm version

Loggr provides logging goodness by presenting error details in a readable format.

Installation

Using cdn:

<script src="https://cdn.rawgit.com/tidupls/loggrr/master/dist/loggrr.min.js"></script>

Using npm:

$ npm install loggrr

Using bower:

$ bower install loggrr

Example

Usually this code snippet wil raise an exception that isn't very helpful.

foo(); // Uncaught ReferenceError: foo is not defined

But with loggrr:

Loggrr.init();
 
foo();
/*
Type: error
Error: Uncaught ReferenceError: foo is not defined
Stack Trace: ReferenceError: foo is not defined at demo/index.html:32:9
File Name: index.html
Path: demo/index.html
Line Number: 32 Column: 9
Date: Sun Jul 17 2016 14:42:52 GMT+0200 (SAST)
Debug: demo/index.html:32
Help: https://stackoverflow.com/search?q=Uncaught+ReferenceError:+foo+is+not+defined
*/

Usage

loggrr.init() // Initializes loggrr, more options to come

Demo

See the demo folder.

Still to do

  • Enable remote logging of error information.
  • Customization of error messages.

Readme

Keywords

Package Sidebar

Install

npm i loggrr

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • tidupls