Nervously Practice Multithreading

    bunyan-express-serializer

    1.0.0 • Public • Published

    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
    

    Install

    npm i bunyan-express-serializer

    DownloadsWeekly Downloads

    4,928

    Version

    1.0.0

    License

    Public Domain

    Last publish

    Collaborators

    • parshap