logging: also log ip address

This commit is contained in:
Alice Gaudon 2020-11-04 12:54:02 +01:00
parent a09e92dd96
commit f20da06d43

View File

@ -46,7 +46,7 @@ export default class LogRequestsComponent extends ApplicationComponent {
req.log.info(requestObj); req.log.info(requestObj);
} }
} else { } else {
let logStr = `${req.method} ${req.originalUrl} - ${res.statusCode}`; let logStr = `${req.ip} < ${req.method} ${req.originalUrl} - ${res.statusCode}`;
if (err) { if (err) {
if (err instanceof Error) { if (err instanceof Error) {
if (silent) { if (silent) {