From 2100f681df20082dfcc492de679490fbc705105f Mon Sep 17 00:00:00 2001 From: sijinhui Date: Fri, 26 Apr 2024 18:00:03 +0800 Subject: [PATCH] debug log --- app/api/auth.ts | 6 +++--- app/api/common.ts | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/api/auth.ts b/app/api/auth.ts index 2c1115f40..0ecb9ad70 100644 --- a/app/api/auth.ts +++ b/app/api/auth.ts @@ -88,13 +88,13 @@ export function auth( } if (systemApiKey) { - console.log("[Auth] use system api key"); + // console.log("[Auth] use system api key"); req.headers.set("Authorization", `Bearer ${systemApiKey}`); } else { - console.log("[Auth] admin did not provide an api key"); + // console.log("[Auth] admin did not provide an api key"); } } else { - console.log("[Auth] use user api key"); + // console.log("[Auth] use user api key"); } return { diff --git a/app/api/common.ts b/app/api/common.ts index 3c8b43fbb..472b4d05e 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -117,7 +117,7 @@ export async function requestOpenai( // If openaiOrganizationHeader is present, log it; otherwise, log that the header is not present console.log("[Org ID]", openaiOrganizationHeader); } else { - console.log("[Org ID] is not set up."); + // console.log("[Org ID] is not set up."); } // to prevent browser prompt for credentials @@ -196,6 +196,7 @@ export async function saveLogs(logData: { getTokenLength(matchAllMessage.join(" ")) + matchAllMessage.length * 3; } + console.log("[debug log]----", logData); delete logData?.logEntry; } if (logData?.model == "midjourney") {