Skip to content

Instantly share code, notes, and snippets.

@paulmars
Created November 19, 2011 23:35
Show Gist options
  • Save paulmars/1379543 to your computer and use it in GitHub Desktop.
Save paulmars/1379543 to your computer and use it in GitHub Desktop.
Connect/NodeJS Parameter Logging
sys = require 'sys'
exports.paramsLogger = () ->
(req, res, next) ->
console.log("Query: " + sys.inspect(req.query)) if req.query
console.log("Body: " + sys.inspect(req.body)) if req.body
console.log("=============")
next()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment