diff --git a/package.json b/package.json index b75f98f..3f2ea2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wms-core", - "version": "0.4.34", + "version": "0.4.35", "description": "Node web framework", "repository": "git@gitlab.com:ArisuOngaku/wms-core.git", "author": "Alice Gaudon ", diff --git a/src/Application.ts b/src/Application.ts index 091988b..ef26f31 100644 --- a/src/Application.ts +++ b/src/Application.ts @@ -64,7 +64,7 @@ export default abstract class Application { let errorID: string; - let logStr = `${req.method} ${req.originalUrl} - `; + let logStr = `${req.method} ${req.originalUrl} Accept: ${req.accepts()} - `; if (err instanceof BadRequestError || err instanceof ServiceUnavailableHttpError) { logStr += `${err.errorCode} ${err.name}`; errorID = Logger.silentError(err, logStr); diff --git a/src/components/LogRequestsComponent.ts b/src/components/LogRequestsComponent.ts index a77c4f2..c275b00 100644 --- a/src/components/LogRequestsComponent.ts +++ b/src/components/LogRequestsComponent.ts @@ -8,7 +8,7 @@ export default class LogRequestsComponent extends ApplicationComponent { router.use((req, res, next) => { onFinished(res, (err) => { if (!err) { - Logger.info(`${req.method} ${req.originalUrl} - ${res.statusCode}`); + Logger.info(`${req.method} ${req.originalUrl} Accept: ${req.accepts()} - ${res.statusCode}`); } }); next();