Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A middleware for logging request data
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.md
index.js
package.json

README.md

connect-request-data-logger

Log the request data. By default, logs query, body, and files. Formatted to look much like the rails request log.

Install

npm install connect-request-data-logger

Example

var http = require('http')
var connect = require('connect')
var logger = require('connect-request-data-logger')

var app = connect()

// make sure the objects are added to the request before the request is logged
    .use(connect.query())
    .use(connect.bodyParser())


// you can specify any objects within the request to log
    .use(logger({ delimiter: ', ', keys: ['query', 'body'] }))

    .use(function(req, res){
        res.end('hello world\n');
    })

http.createServer(app).listen(3000);
Something went wrong with that request. Please try again.