From cd1b9d0e0cabe07ec7694597f7c70252214095fa Mon Sep 17 00:00:00 2001 From: nai-degen Date: Fri, 1 Dec 2023 11:23:56 -0600 Subject: [PATCH] don't print google api key to container logs on error --- src/shared/prompt-logging/backends/sheets.ts | 2 +- src/shared/prompt-logging/log-queue.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/prompt-logging/backends/sheets.ts b/src/shared/prompt-logging/backends/sheets.ts index 6b2450f..187bd46 100644 --- a/src/shared/prompt-logging/backends/sheets.ts +++ b/src/shared/prompt-logging/backends/sheets.ts @@ -396,7 +396,7 @@ export const init = async (onStop: () => void) => { await loadIndexSheet(false); await writeIndexSheet(); } catch (e) { - log.warn(e, "Could not load index sheet. Creating a new one."); + log.warn({ error: e.message }, "Could not load index sheet. Creating a new one."); await createIndexSheet(); } }; diff --git a/src/shared/prompt-logging/log-queue.ts b/src/shared/prompt-logging/log-queue.ts index 0e337d0..1b40228 100644 --- a/src/shared/prompt-logging/log-queue.ts +++ b/src/shared/prompt-logging/log-queue.ts @@ -69,7 +69,7 @@ export const start = async () => { log.info("Logging backend initialized."); started = true; } catch (e) { - log.error(e, "Could not initialize logging backend."); + log.error({ error: e.message }, "Could not initialize logging backend."); return; } scheduleFlush();