AgoraIO-Community/Agora-RTC-React

Enable setLogLevel

Closed this issue · 3 comments

Right now the logLevel defaults to DEBUG which floods the console with messages.
Exporting the setLogLevel function would let us customize determine the level we want when developing.

Hi @mikeeus thanks for the PR. We already have a default export for AgoraRTC. We'd expect users to set the log level like so:

import AgoraRTC, {createClient} from "agora-rtc-react";
...
AgoraRTC.setLogLevel(3)

Does that solve your issue?

Yes that should work, thanks!

Anyone kn ow why I get this error when trying to build in production? Attempted import error: 'agora-rtc-sdk-ng' does not contain a default export (imported as 'AgoraRTC__default').