working on more informative log files

parent a7021637
......@@ -59,10 +59,10 @@ module.exports.http = {
* *
****************************************************************************/
// myRequestLogger: function (req, res, next) {
// console.log("Requested :: ", req.method, req.url);
// return next();
// }
myRequestLogger: function (req, res, next) {
req._sails.log.info(req.method, req.url, res.statusCode, req.allParams());
return next();
},
......
......@@ -22,10 +22,10 @@
module.exports.routes = {
// This is to log to info every access
'/*': function(req, res, next) {
sails.log.info(req.method, req.url, req.allParams());
next();
},
// '/*': function(req, res, next) {
// sails.log.info(req.method, req.url, req.allParams());
// next();
// },
// Grouped by API url (/a, /b, ...)
// Sorted by HTTP method (GET, PUT, POST and DELETE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment