mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 15:51:43 +00:00
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.
This commit is contained in:
parent
61d8033a4b
commit
ec3b6b14a9
@ -1,2 +1 @@
|
||||
PUBLIC_DOTCOM=
|
||||
PUBLIC_ENABLE_EVENT_LOGGER=
|
||||
|
||||
@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -1,11 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte'
|
||||
|
||||
import HeroPage from '$lib/HeroPage.svelte'
|
||||
import { logViewEvent } from '$lib/logger'
|
||||
import { TELEMETRY_RECORDER } from '$lib/telemetry'
|
||||
|
||||
export let repoName: string
|
||||
export let viewerCanAdminister: boolean
|
||||
|
||||
logViewEvent('RepositoryError')
|
||||
onMount(() => {
|
||||
TELEMETRY_RECORDER.recordEvent('repo.error.notFound', 'view')
|
||||
})
|
||||
</script>
|
||||
|
||||
<HeroPage title="Repository not found" icon={ILucideBookX}>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user