Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A simple console.error override written in pure javascript.

NotificationsYou must be signed in to change notification settings

sierraindiagolf/errorlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

. A simple console.error override written in pure javascript.

How to use ?

Make sure you include errorLog.js in your page. Recommended as first file that loads.Set up the snippet to transport data back to you server.

Installation

bower install errorlog

npm install errorlog-browser

API

onError(error, log)

Callback that enables you to decorade the error object that is beeing collected.By default this object will look like this :var errorObj = {title: errTitle,lineColumn: errLineColumn[0],windowHeight: windowHeight,windowWidth: windowWidth,os: os,browser: browser,url: url,payload: errPayload};

Example

errorLogger.logger.onError = function (errorObj, originalError) { //do stuf here... }

Send

You have to implement this method yourself. This snippet is completely agnostic to any transport.You have access to the collected errors in the

errorLogger.logger.log
array.

Example

errorLogger.logger.send = function () { XHR(errorLogger.logger.log) }

About

A simple console.error override written in pure javascript.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp