From ec3b6b14a966aac8e8e016cf27aadcfffe952023 Mon Sep 17 00:00:00 2001 From: Felix Kling Date: Wed, 19 Jun 2024 15:54:31 +0200 Subject: [PATCH] chore(svelte): Remove stub logger (#63342) We've recently added v2 telemetry support and should not use the stub logger anymore. ## Test plan Code inspection. --- client/web-sveltekit/.env | 1 - client/web-sveltekit/src/lib/logger.ts | 18 ------------------ .../[...repo=reporev]/RepoNotFoundError.svelte | 8 ++++++-- 3 files changed, 6 insertions(+), 21 deletions(-) delete mode 100644 client/web-sveltekit/src/lib/logger.ts diff --git a/client/web-sveltekit/.env b/client/web-sveltekit/.env index f6b742fb3ce..87a5252303c 100644 --- a/client/web-sveltekit/.env +++ b/client/web-sveltekit/.env @@ -1,2 +1 @@ PUBLIC_DOTCOM= -PUBLIC_ENABLE_EVENT_LOGGER= diff --git a/client/web-sveltekit/src/lib/logger.ts b/client/web-sveltekit/src/lib/logger.ts deleted file mode 100644 index ecf89210c8b..00000000000 --- a/client/web-sveltekit/src/lib/logger.ts +++ /dev/null @@ -1,18 +0,0 @@ -// We want to limit the number of imported modules as much as possible - -import { onMount } from 'svelte' - -import { PUBLIC_ENABLE_EVENT_LOGGER } from '$env/static/public' - -/** - * Can only be called during component initialization. It logs a view event when - * the component is mounted (and event logging is enabled). - */ -export function logViewEvent(eventName: string, eventProperties?: any, publicArgument?: any): void { - if (PUBLIC_ENABLE_EVENT_LOGGER) { - onMount(() => { - // TODO: Implement event logging - console.log('logViewEvent', eventName, eventProperties, publicArgument) - }) - } -} diff --git a/client/web-sveltekit/src/routes/[...repo=reporev]/RepoNotFoundError.svelte b/client/web-sveltekit/src/routes/[...repo=reporev]/RepoNotFoundError.svelte index 796537fa388..c7e102cddcd 100644 --- a/client/web-sveltekit/src/routes/[...repo=reporev]/RepoNotFoundError.svelte +++ b/client/web-sveltekit/src/routes/[...repo=reporev]/RepoNotFoundError.svelte @@ -1,11 +1,15 @@