Skip to content

Commit ea83737

Browse files
committed
Remove unused CLI console suppression helper
1 parent 9d908bf commit ea83737

File tree

2 files changed

+0
-113
lines changed

2 files changed

+0
-113
lines changed

cli/src/utils/analytics.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { PostHog } from 'posthog-node'
22

3-
import { suppressConsoleOutput } from './suppress-console'
4-
53
import type { AnalyticsEvent } from '@codebuff/common/constants/analytics-events'
64

75
// Prints the events to console
@@ -15,16 +13,6 @@ let client: PostHog | undefined
1513

1614
export let identified: boolean = false
1715

18-
// Apply console wrapping when PostHog is initialized
19-
function suppressPostHogConsoleErrors() {
20-
suppressConsoleOutput('error', (args, errorName) =>
21-
errorName.toLowerCase().includes('posthog'),
22-
)
23-
suppressConsoleOutput('warn', (args, errorName) =>
24-
errorName.toLowerCase().includes('posthog'),
25-
)
26-
}
27-
2816
export function initAnalytics() {
2917
if (
3018
!process.env.NEXT_PUBLIC_POSTHOG_API_KEY ||
@@ -40,9 +28,6 @@ export function initAnalytics() {
4028
enableExceptionAutocapture:
4129
process.env.NEXT_PUBLIC_CB_ENVIRONMENT === 'prod',
4230
})
43-
44-
// Suppress PostHog console errors after initialization
45-
suppressPostHogConsoleErrors()
4631
}
4732

4833
export async function flushAnalytics() {

cli/src/utils/suppress-console.ts

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)