🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

bunyan-express-serializer

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

bunyan-express-serializer

Bunyan serializer for Express objects

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
838
-4.45%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

bunyan

FAQs

Package last updated on 27 Sep 2014

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