diff --git a/src/livekit/useLiveKit.ts b/src/livekit/useLiveKit.ts index fe1bec20..d6d8394b 100644 --- a/src/livekit/useLiveKit.ts +++ b/src/livekit/useLiveKit.ts @@ -20,7 +20,6 @@ import { ExternalE2EEKeyProvider, Room, RoomOptions, - setLogLevel, } from "livekit-client"; import { useLiveKitRoom } from "@livekit/components-react"; import { useEffect, useMemo, useRef, useState } from "react"; @@ -44,8 +43,6 @@ export type E2EEConfig = { sharedKey: string; }; -setLogLevel("debug"); - interface UseLivekitResult { livekitRoom?: Room; connState: ECConnectionState; diff --git a/src/main.tsx b/src/main.tsx index d04a3a94..0ec2bfae 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -23,13 +23,19 @@ import "matrix-js-sdk/src/browser-index"; import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; import { createBrowserHistory } from "history"; - import "./index.css"; +import { setLogLevel as setLKLogLevel } from "livekit-client"; + import App from "./App"; import { init as initRageshake } from "./settings/rageshake"; import { Initializer } from "./initializer"; initRageshake(); +// set livekit's log level: we do this after initialising rageshakes because +// we need rageshake to do its monkey patching first, so the livekit +// logger gets the patched log funxction, so it picks up livekit's +// logs. +setLKLogLevel("debug"); console.info(`Element Call ${import.meta.env.VITE_APP_VERSION || "dev"}`);