From fdd5317c6267e1e3912e672c337f5071e2591b39 Mon Sep 17 00:00:00 2001 From: whatasame <97666463+whatasame@users.noreply.github.com> Date: Sun, 17 Dec 2023 18:42:19 +0900 Subject: [PATCH 1/2] feat: Log the response body when the request succeeds with LogLevel.DEBUG --- src/Client.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Client.ts b/src/Client.ts index 338807b9..6c96b413 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -220,6 +220,7 @@ export default class Client { const responseJson: ResponseBody = JSON.parse(responseText) this.log(LogLevel.INFO, `request success`, { method, path }) + this.log(LogLevel.DEBUG, `succeed response body`, { body: responseText }) return responseJson } catch (error: unknown) { if (!isNotionClientError(error)) { From f5b0ceac62f99355f0f89bd0350d083c4da22dbe Mon Sep 17 00:00:00 2001 From: whatasame <97666463+whatasame@users.noreply.github.com> Date: Sat, 13 Jan 2024 15:01:22 +0900 Subject: [PATCH 2/2] fix: Fix typo --- src/Client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.ts b/src/Client.ts index 6c96b413..d0e49bce 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -220,7 +220,7 @@ export default class Client { const responseJson: ResponseBody = JSON.parse(responseText) this.log(LogLevel.INFO, `request success`, { method, path }) - this.log(LogLevel.DEBUG, `succeed response body`, { body: responseText }) + this.log(LogLevel.DEBUG, `succeeded response body`, { body: responseText }) return responseJson } catch (error: unknown) { if (!isNotionClientError(error)) {