Created
September 7, 2015 10:58
-
-
Save davidgilbertson/f76f56e276a63a4f8499 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const log = require('./log.js')('http:request'); | |
export default (req, nes, next) => { | |
const httpRequest = { | |
method: req.method, | |
url: req.url, | |
headers: req.headers, | |
remoteAddress: req.connection.remoteAddress, | |
remotePort: req.connection.remotePort | |
}; | |
log.info({httpRequest}); | |
next(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment