bunyan-express-serializer
Bunyan serializer for Express objects
Last updated 6 years ago by parshap .
Public Domain · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bunyan-express-serializer 
SYNC missed versions from official npm registry.

bunyan-express-serializer

Serialize Express-like request objects.

This Bunyan serializer behaves like Bunyan's built-in req serializer, but handles the differences between the Node core req object (http.IncomingMessage) and the Express req object. Specifically, it adds logging of req.originalUrl.

See node-bunyan#169 for motivation.

Usage

var log = require("bunyan").createLogger({
  serializers: {
    req: require("express-bunyan-serializer"),
  },
});

// ...
log.info({
  req: // Some Express req object with originalUrl
});

Installation

npm install express-bunyan-serializer

Current Tags

  • 1.0.0                                ...           latest (6 years ago)

1 Versions

  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 1
This Week 58
This Month 142
Last Day 11
Last Week 45
Last Month 57
Dependencies (2)
Dev Dependencies (1)

Copyright 2014 - 2016 © taobao.org |