1.0.7 • Published 8 years ago

client-error-logger v1.0.7

Weekly downloads
10
License
MIT
Repository
github
Last release
8 years ago

error-logger

Bower version npm version GitHub issues GitHub license

Logging front-end errors to the server.

Russian version

Installation

$ npm install --save client-error-logger

or

$ bower install --save error-logger

The script supports amd, CommonJS, and you can just plug in a script tag on the page.

var errorLogger = require('client-error-logger');

or

require(['/bower_components/error-logger/error-logger.min'], function (errorLogger) {
  errorLogger();
});

or

<script src="/js/error-logger.min.js"></script>

Usage

If logging to the server is not required, you can call errorLogger() without any parameters. If you want to write the error logs of client to server, pass as argument the address of the query processor. For example:

errorLogger('http://my-best-site.com/logger.php');

Will be sent POST request with three parameters:

  • message - error message
  • file - in what file an error occurred,
  • line - on what line of code error occurred.
1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago