working on more informative log files

parent a7021637
...@@ -59,10 +59,10 @@ module.exports.http = { ...@@ -59,10 +59,10 @@ module.exports.http = {
* * * *
****************************************************************************/ ****************************************************************************/
// myRequestLogger: function (req, res, next) { myRequestLogger: function (req, res, next) {
// console.log("Requested :: ", req.method, req.url); req._sails.log.info(req.method, req.url, res.statusCode, req.allParams());
// return next(); return next();
// } },
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
module.exports.routes = { module.exports.routes = {
// This is to log to info every access // This is to log to info every access
'/*': function(req, res, next) { // '/*': function(req, res, next) {
sails.log.info(req.method, req.url, req.allParams()); // sails.log.info(req.method, req.url, req.allParams());
next(); // next();
}, // },
// Grouped by API url (/a, /b, ...) // Grouped by API url (/a, /b, ...)
// Sorted by HTTP method (GET, PUT, POST and DELETE) // 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