FLogConfig
Configuration of Agora SDK log files.
USTRUCT(BlueprintType) struct FLogConfig { GENERATED_BODY() public: UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LogConfig") FString filePath = ""; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LogConfig") int64 fileSizeInKB = 2048; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|LogConfig") ELOG_LEVEL level = ELOG_LEVEL::LOG_LEVEL_INFO; FLogConfig() {} FLogConfig(const agora::commons::LogConfig& AgoraData) { filePath = UTF8_TO_TCHAR(AgoraData.filePath); fileSizeInKB = AgoraData.fileSizeInKB; level = (ELOG_LEVEL)AgoraData.level; } agora::commons::LogConfig CreateAgoraData() const { agora::commons::LogConfig AgoraData; SET_UABT_FSTRING_TO_CONST_CHAR___MEMALLOC(AgoraData.filePath, filePath) AgoraData.fileSizeInKB = UABT::ToUInt32(fileSizeInKB); AgoraData.level = (agora::commons::LOG_LEVEL)level; return AgoraData; } void FreeAgoraData(agora::commons::LogConfig& AgoraData) const { SET_UABT_FSTRING_TO_CONST_CHAR___MEMFREE(AgoraData.filePath) } };
Attributes
- filePath
-
The complete path of the log files. Agora recommends using the default log directory. If you need to modify the default directory, ensure that the directory you specify exists and is writable.
The default log directory is:- Android: /storage/emulated/0/Android/data/<packagename>/files/agorasdk.log.
- iOS: App Sandbox/Library/caches/agorasdk.log.
- macOS:
- If Sandbox is enabled: App Sandbox/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,20480]. The default value is 2,048 KB. If you setfileSizeInKByte
smaller than 128 KB, the SDK automatically adjusts it to 128 KB; if you setfileSizeInKByte
greater than 20,480 KB, the SDK automatically adjusts it to 20,480 KB. - level
-
The output level of the SDK log file. See ELOG_LEVEL.
For example, if you set the log level to WARN, the SDK outputs the logs within levels FATAL, ERROR, and WARN.