Skip to content

Express middleware for server-side logging of client-side Javascript errors

License

Notifications You must be signed in to change notification settings

elmccarthy/express-client-errorlog

Repository files navigation

express-client-errorlog

Express middleware for server-side logging of client-side Javascript errors.

Example

In your express app:

var express = require('express');
var errorlog = require('express-client-errorlog');
var app = express();
app.use(errorlog());

In your client-side HTML:

<script src='/path/to/express/app/errorlog.js'></script>

Options

app.use(errorlog(options));
  • options.logger
    A winston logger to which the errors will be sent.

  • options.headers
    A list of HTTP headers to send in the winston meta object.

About

Express middleware for server-side logging of client-side Javascript errors

Resources

License

Stars

Watchers

Forks

Packages

No packages published