Set log level for SDK
Logging can be enabled and levels can be set using LoggingAdditional class. Logs can be printed to console or to a File. By default, No Log is used. There are the 6 log levels:
- No Log
- Error
- Warning
- Info
- Debug
- Verbose
To enable logging, follow the steps below.
Import the following classes in implementation file.
import com.comcast.irisrtcsdk.Logger; import com.comcast.irisrtcsdk.LoggingAdditional; import com.comcast.irisrtcsdk.log;
Decide the logging level from log class in the implementation file.
Log levels: NO_LOG, ERROR, WARN, INFO, DEBUG, VERBOSEstatic const int irisLogLevel = log.DEBUG;
To enable console logging, use ConsoleLogger class and to write logs to a file, use FileLogging class. Below code shows how to use ConsoleLogging class.
... ... //To set console logging LoggingAdditional logger = new LoggingAdditional(ConsoleLogger.sharedInstance, appContext); //To set severity level logger.setLogLevel(irisLogLevel); ... ...