From 7ec3df2dc30e2270da47e9b083d8c9023eb3e272 Mon Sep 17 00:00:00 2001 From: argirok Date: Fri, 19 Jul 2024 12:37:23 +0300 Subject: [PATCH] [develop | DONE | CHANGED ] Cache: update accesslogCustomFormat --- services/cache/mecache/cache.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/services/cache/mecache/cache.js b/services/cache/mecache/cache.js index 995fc2d6..ca40b2f3 100644 --- a/services/cache/mecache/cache.js +++ b/services/cache/mecache/cache.js @@ -216,15 +216,18 @@ function resetAtMidnight() { }, msToMidnight); } - function accesslogCustomFormat(req, res){ - accesslog(req, res, - /*{ - userID: function (req) { return req.user; }, - format : 'url=":url" method=":method" statusCode=":statusCode" delta=":delta" ip=":ip"' - }*/); -// url="/clear" method="GET" statusCode="200" delta="2" ip="::ffff:195.134.66.178" - + // default format + accesslog(req, res); // ::ffff:195.134.66.178 - - [15/Jul/2024:11:24:35 +0300] "GET /clear HTTP/1.1" 200 59 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0" + //custom format + /* + accesslog(req, res, + { + userID: function (req) { return req.user; }, + format : 'url=":url" method=":method" statusCode=":statusCode" delta=":delta" ip=":ip"' + }); + */ +// url="/clear" method="GET" statusCode="200" delta="2" ip="::ffff:195.134.66.178" }