mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Include altSessionId in morgan request logging
Summary: Most logging now includes altSessionId, but not the message logged at the end of every request by the 'morgan' logger. This includes altSessionId in those messages. Test Plan: Verified that with GRIST_HOSTED_VERSION env var set, altSessionId is included in morgan-produced JSON messages. Reviewers: georgegevoian Reviewed By: georgegevoian Subscribers: georgegevoian Differential Revision: https://phab.getgrist.com/D3523
This commit is contained in:
parent
d221aeed24
commit
a0f405e45f
@ -327,7 +327,8 @@ export class FlexServer implements GristServer {
|
|||||||
status: tokens.status(req, res),
|
status: tokens.status(req, res),
|
||||||
timeMs: parseFloat(tokens['response-time'](req, res)) || undefined,
|
timeMs: parseFloat(tokens['response-time'](req, res)) || undefined,
|
||||||
contentLength: parseInt(tokens.res(req, res, 'content-length'), 10) || undefined,
|
contentLength: parseInt(tokens.res(req, res, 'content-length'), 10) || undefined,
|
||||||
host: tokens.host(req, res)
|
host: tokens.host(req, res),
|
||||||
|
altSessionId: req.altSessionId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.app.use(morganLogger(process.env.GRIST_HOSTED_VERSION ? outputJson : msg, {
|
this.app.use(morganLogger(process.env.GRIST_HOSTED_VERSION ? outputJson : msg, {
|
||||||
|
Loading…
Reference in New Issue
Block a user