LogConfig
Configuration of Agora SDK log files.
struct LogConfig { const char* filePath; uint32_t fileSizeInKB; LOG_LEVEL level; LogConfig() : filePath(NULL), fileSizeInKB(DEFAULT_LOG_SIZE_IN_KB), level(OPTIONAL_LOG_LEVEL_SPECIFIER LOG_LEVEL_INFO) {} };
Attributes
- filePath
-
The complete path of the log files. Ensure that the path for the log file exists and is writable. You can use this parameter to rename the log files.
The default file path is:- Android:/storage/emulated/0/Android/data/<packagename>/files/agorasdk.log.
- iOS:App Sandbox/Library/caches/agorasdk.log.
- macOS
- If Sandbox is enabled: App~/Library/Logs/agorasdk.log. For example, /Users/<username>/Library/Containers/<AppBundleIdentifier>/Data/Library/Logs/agorasdk.log.
- If Sandbox is disabled: ~/Library/Logs/agorasdk.log.
- Windows:C:\Users\<user_name>\AppData\Local\Agora\<process_name>\agorasdk.log。
- fileSizeInKB
- The size (KB) of an
agorasdk.log
file. The value range is [128,1024]. The default value is 1,024 KB. If you setfileSizeInKByte
to a value lower than 128 KB, the SDK adjusts it to 128 KB. If you setfileSizeInKBytes
to a value higher than 1,024 KB, the SDK adjusts it to 1,024 KB. - level
-
The output level of the SDK log file. See LOG_LEVEL.
For example, if you set the log level to WARN, the SDK outputs the logs within levels FATAL, ERROR, and WARN.