LogConfig

Used to configure the log file of the Agora SDK.

struct LogConfig {
  const char* filePath;
  uint32_t fileSizeInKB;
  LOG_LEVEL level;
};

Properties

filePath
Full path of the log file. Agora recommends using the default log directory. If you need to change the default directory, make sure the specified directory exists and is writable. The default log directories are:
  • Android: /storage/emulated/0/Android/data/<packagename>/files/agorasdk.log
  • iOS: App Sandbox/Library/caches/agorasdk.log
  • macOS:
    • With Sandbox enabled: App Sandbox/Library/Logs/agorasdk.log, e.g., /Users/<username>/Library/Containers/<AppBundleIdentifier>/Data/Library/Logs/agorasdk.log
    • Without Sandbox: ~/Library/Logs/agorasdk.log
  • Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\agorasdk.log
fileSizeInKB
Size of the agorasdk.log file in KB. The value range is [128, 20480], and the default is 2048 KB. If the value is less than 128 KB, the SDK automatically adjusts it to 128 KB; if greater than 20480 KB, it adjusts to 20480 KB.
level
Log output level. See LOG_LEVEL. For example, if set to WARN, the SDK outputs logs at FATAL, ERROR, and WARN levels.