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

Bugfix: use basUrl when logging actual request path

This commit is contained in:
ivaosthu 2017-10-12 09:19:56 +02:00
parent 4f98f80c61
commit 61cf76b4f6

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}`);
}); });
} }