Open source video conferencing app powered by LiveKit. Built with Django and React.
🔇(frontend) remove LiveKit logs in production
lebaudantoine1971f594cf29
diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsxindex 4c61e898..aab0ef18 100644--- a/src/frontend/src/App.tsx+++ b/src/frontend/src/App.tsx@@ -10,12 +10,17 @@ import { Layout } from './layout/Layout'import { NotFoundScreen } from './components/NotFoundScreen'import { routes } from './routes'import './i18n/init'+import { silenceLiveKitLogs } from "@/utils/livekit.ts";const queryClient = new QueryClient()function App() {const { i18n } = useTranslation()useLang(i18n.language)++ const isProduction = import.meta.env.PROD+ silenceLiveKitLogs(isProduction)+return (<QueryClientProvider client={queryClient}><Suspense fallback={null}>diff --git a/src/frontend/src/utils/livekit.ts b/src/frontend/src/utils/livekit.tsnew file mode 100644index 00000000..86d52d4b--- /dev/null+++ b/src/frontend/src/utils/livekit.ts@@ -0,0 +1,6 @@+import { LogLevel, setLogLevel } from "livekit-client";+++export const silenceLiveKitLogs = (shouldSilenceLogs: boolean) => {+ setLogLevel(shouldSilenceLogs ? LogLevel.silent : LogLevel.debug);+}