New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@immutabl3/error-logger

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@immutabl3/error-logger

js browser-to-server error logger

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

error-logger

js browser-to-server error logger

npm install @immutabl3/error-logger

About

Uses stacktrace-js and mailgun-js to catch and email errors from client-side applications.

Browser

const errorLogger = require('@immutable/error-logger/browser');

const logger = errorLogger({
	// if true, errors won't be reported to the server
	// they will instead be logged to the console
	debug: false,
	// url to POST the log
	url: '/error'
});

// listen for any uncaught errors on the window
logger.listen();

// log an error manually by passing an Error object
logger.log(error, [level = 'debug']);

Express

const errorLogger = require('@immutable/error-logger/express');

const logger = errorLogger({
	// mailgun configuration
	mailgunKey: '',
	mailgunDomain: '',
	// from email address
	from: ''
	// to email address
	to: ''
	// [optional] string to place in the subject line
	subject: ''
});

app.post('/error', logger);

License

MIT

FAQs

Package last updated on 27 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts