Skip to content

Commit

Permalink
feat: FORMS-945 add diagnostic info to the http logs (bcgov#1210)
Browse files Browse the repository at this point in the history
Co-authored-by: Walter Moar <[email protected]>
  • Loading branch information
bcgov-citz-ccft and WalterMoar committed Jan 8, 2024
1 parent ff525b9 commit 7117263
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/components/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const httpLogger = logger({
return {
azp: (token && token.azp) || undefined,
contentLength: res.get('content-length'),
formId: (req.auth && req.auth.user) || undefined,
httpVersion: req.httpVersion,
ip: req.ip,
method: req.method,
Expand All @@ -86,6 +87,7 @@ const httpLogger = logger({
responseTime: res.responseTime,
statusCode: res.statusCode,
userAgent: req.get('user-agent'),
username: (token && token.idp_username) || undefined,
};
},
expressFormat: true, // Use express style message strings
Expand Down

0 comments on commit 7117263

Please sign in to comment.