1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-06-09 01:17:06 +02:00

Bugfix: use basUrl when logging actual request path

This commit is contained in:
ivaosthu 2017-10-12 09:19:56 +02:00 committed by Ivar Conradi Østhus
parent 3e7098578b
commit 12ef0db1f1

View File

@ -37,7 +37,7 @@ module.exports = function(config) {
app.use( app.use(
responseTime((req, res, time) => { responseTime((req, res, time) => {
const timingInfo = { const timingInfo = {
path: req.path, path: req.baseUrl,
method: req.method, method: req.method,
statusCode: res.statusCode, statusCode: res.statusCode,
time, time,
@ -57,7 +57,7 @@ module.exports = function(config) {
if (config.enableRequestLogger) { if (config.enableRequestLogger) {
app.use((req, res, next) => { app.use((req, res, next) => {
next(); next();
logger.info(`${res.statusCode} ${req.method} ${req.path}`); logger.info(`${res.statusCode} ${req.method} ${req.baseUrl}`);
}); });
} }