Skip to content

molejs/mole-reporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mole-reporter Build Status

mole-reporter is one of the three independent packages that form the whole molejs service stack. It is a reporting library, that gathers action-states on a js application and reports errors to the mole-server, including the action-states prior to the error.

It's extremely easy to implement, especially with data-workflow handlers such as redux.

All the reported logs follow the mole log specification.

Requirements

Install

npm install --save mole-reporter

Usage

The only configuration required is for setting the error-server url:

import Mole from 'mole-reporter';

Mole.config({url: 'http://errors.example.com/mole'});

To record errors, simply report them.

import Mole from 'mole-reporter';

Mole.report(error);

In order to record app action-state history, record every action and state.

import Mole from 'mole-reporter';

Mole.registerActionState(action, state);

Optional config

Extra config options are self-explanatory (values in the example are defaults).

import Mole from 'mole-reporter';

Mole.config({
    url: '',
    stacktraceLimit: 50,
    historyLimit: 10
});

About

Reporting library, that gathers action-states on a js application and reports errors to the mole-server

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors