scimgateway 6.1.7 → 6.1.8
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.
- package/README.md +6 -0
- package/lib/logger.ts +7 -1
- package/lib/scimgateway.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/logger.ts
CHANGED
|
@@ -297,7 +297,13 @@ export class Logger {
|
|
|
297
297
|
private async log(level: 'debug' | 'info' | 'warn' | 'error', message: string, obj?: Record<string, any>) {
|
|
298
298
|
const time = new Date().toISOString()
|
|
299
299
|
message = this.maskSecret(message)
|
|
300
|
-
|
|
300
|
+
|
|
301
|
+
if (typeof obj === 'object' && !Array.isArray(obj)) {
|
|
302
|
+
obj = JSON.parse(JSON.stringify(obj, (_k, v) => {
|
|
303
|
+
if (typeof v === 'string') return this.maskSecret(v)
|
|
304
|
+
return v
|
|
305
|
+
}))
|
|
306
|
+
}
|
|
301
307
|
const msgObj: Record<string, any> = {
|
|
302
308
|
time,
|
|
303
309
|
level,
|
package/lib/scimgateway.ts
CHANGED
|
@@ -548,7 +548,7 @@ export class ScimGateway {
|
|
|
548
548
|
status: ctx.response.status,
|
|
549
549
|
method: ctx.request.method,
|
|
550
550
|
url: ctx.request.url,
|
|
551
|
-
requestBody: ctx.request.body,
|
|
551
|
+
requestBody: JSON.stringify(ctx.request.body),
|
|
552
552
|
responseBody: outbound,
|
|
553
553
|
}
|
|
554
554
|
let msg = utils.statusText(logEvent.status)
|
package/package.json
CHANGED