@develit-io/backend-sdk 9.1.3 → 9.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -166,8 +166,9 @@ const logger = () => {
166
166
  logRequest(requestLog);
167
167
  if (!context.env.MIDDLEWARE_LOGGER_AUDITLOG_DISABLED) {
168
168
  const userContext = context.get("user");
169
+ const requestId = uuidv4();
169
170
  context.set("auditLog", {
170
- requestId: uuidv4()
171
+ requestId
171
172
  });
172
173
  await context.env.AUDITLOG_SERVICE.processLog({
173
174
  type: "REQUEST",
@@ -181,7 +182,8 @@ const logger = () => {
181
182
  ip: getRequestIpAddress(context.req),
182
183
  userAgent: getRequestUserAgent(context.req)
183
184
  },
184
- logRecord: JSON.stringify(requestLog)
185
+ logRecord: JSON.stringify(requestLog),
186
+ requestId
185
187
  });
186
188
  }
187
189
  }
@@ -191,7 +193,7 @@ const logger = () => {
191
193
  const responseLog = await composeResponseLog(
192
194
  response,
193
195
  context.req.method,
194
- context.req.url
196
+ context.req.path
195
197
  );
196
198
  logResponse(responseLog);
197
199
  if (!context.env.MIDDLEWARE_LOGGER_AUDITLOG_DISABLED) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-io/backend-sdk",
3
- "version": "9.1.3",
3
+ "version": "9.1.4",
4
4
  "description": "Develit Backend SDK",
5
5
  "author": "Develit.io",
6
6
  "license": "ISC",