HMSLogger is a logging api that lets you see all the other api logs as they are called. Instead of logging the values on your app in each and every function you can easily monitor and debug via these logs. By default all the logs are disabled. You need to call updateLogLevel to enable logs.

import { HMSLogger, HMSLogLevel } from '@100mslive/react-native-hms'; // create HMSLogger instance and set log level const logger = new HMSLogger(); logger.updateLogLevel(HMSLogLevel.VERBOSE, true); // instance acquired from build method build.setLogger(logger);

Update Log level

logger.updateLogLevel(HMSLogLevel.VERBOSE, false); logger.updateLogLevel(HMSLogLevel.WARNING, true);


You can subscribe to different log levels by passing HMSLogLevel enums to HMSLogger

HMSLogLevel.VERBOSE Verbose will display basic logs from the sdk in the console

HMSLogLevel.WARNING Warnings will be displayed on screen with a yellow background. These alerts are known as YellowBoxes. Click on the alerts to show more information or to dismiss them.

HMSLogLevel.ERROR In-app errors are displayed in a full screen alert with a red background inside your app. This screen is known as a RedBox.


HMSLogger Example

Have a suggestion? Recommend changes ->

Was this helpful?