LogConfig
Configuration for SDK log files.
public class LogConfig
{
public LogConfig()
{
filePath = "";
fileSizeInKB = 0;
level = LOG_LEVEL.LOG_LEVEL_INFO;
}
public LogConfig(string filePath, uint fileSize = 1024, LOG_LEVEL level = LOG_LEVEL.LOG_LEVEL_INFO)
{
this.filePath = filePath;
this.fileSizeInKB = 0;
this.level = level;
}
public string filePath { set; get; }
public uint fileSizeInKB { set; get; }
public LOG_LEVEL level { set; get; }
};
Properties
- filePath
- Full path of the log file. Agora recommends using the default log path. If you need to change the default path, make sure the specified path exists and is writable.
Default paths:
- Android: /storage/emulated/0/Android/data/<packagename>/files/agorasdk.log
- iOS: App Sandbox/Library/caches/agorasdk.log
- macOS:
- Sandbox enabled: App Sandbox/Library/Logs/agorasdk.log, e.g., /Users/<username>/Library/Containers/<AppBundleIdentifier>/Data/Library/Logs/agorasdk.log
- Sandbox disabled: ~/Library/Logs/agorasdk.log
- Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\agorasdk.log
- fileSizeInKB
- Size of a single
agorasdk.logfile in KB. The valid range is [128, 20480], with a default of 2048 KB. If you setfileSizeInKByteto less than 128 KB, the SDK automatically adjusts it to 128 KB; if you set it to more than 20480 KB, the SDK adjusts it to 20480 KB. - level
- Log output level of the SDK. See LOG_LEVEL. For example, if you choose WARN level, you will see all log messages at FATAL, ERROR, and WARN levels.