npm.io
3.3.5 • Published 7 years ago

alyne-errtracker

Licence
WTFPL
Version
3.3.5
Deps
1
Size
67 kB
Vulns
0
Weekly
0

Alyne Errortracker

A simple ErrorTracker-Module for Raygun.

How it works

First of all you should require the Errortracker module.

const errtracker = require("alyne-errtracker");

Next step is initializing the component by running the init-function. If you using SailsJS, errtracker will read out the environment by itself.

// Simple as it gets.
errtracker.init("YOUR_API_KEY");

// Example with custom environment.
errtracker.init("YOUR_API_KEY", { env:"prod" });

Now you're set, so you can start to track some errors :).

// Simple error tracking with String
errtracker.trackError("Thats a test error from node lib");

// or Error Object
errtracker.trackError(new Error("Thats a test error from node lib"));