Skip to content

Instantly share code, notes, and snippets.

@davinci2015
Last active November 9, 2017 19:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davinci2015/35cc4f8cf7b3748faf57d4f862d484e8 to your computer and use it in GitHub Desktop.
Save davinci2015/35cc4f8cf7b3748faf57d4f862d484e8 to your computer and use it in GitHub Desktop.
var morgan = require('morgan');
morgan(function (tokens, req, res) {
return [
'COBE custom format function',
tokens.method(req, res),
tokens.url(req, res),
tokens.status(req, res),
tokens.res(req, res, 'content-length'), '-',
tokens['response-time'](req, res), 'ms'
].join(' ')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment