diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 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 ( diff --git a/src/frontend/src/utils/livekit.ts b/src/frontend/src/utils/livekit.ts new file mode 100644 index 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); +}