Agora C++ API Reference for All Platforms
agora::rtc::LogConfig Struct Reference

#include <IAgoraRtcEngine.h>

Public Member Functions

 LogConfig ()

Public Attributes

const char * filePath
int fileSize

Detailed Description

The configuration of the log files.


Constructor & Destructor Documentation

◆ LogConfig()

agora::rtc::LogConfig::LogConfig ( )

Member Data Documentation

◆ filePath

const char* agora::rtc::LogConfig::filePath

The absolute path of log files.

The default file path is:

  • Android: /storage/emulated/0/Android/data/<package name>/files/agorasdk.log
  • iOS: App Sandbox/Library/caches/agorasdk.log
  • macOS:
    • Sandbox enabled: App Sandbox/Library/Logs/agorasdk.log, such as /Users/<username>/Library/Containers/<App Bundle Identifier>/Data/Library/Logs/agorasdk.log.
    • Sandbox disabled: /Users/<username>/Library/Caches/<App Bundle Identifier>/Logs/agorasdk.log.
  • Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\agorasdk.log

Ensure that the directory for the log files exists and is writable. You can use this parameter to rename the log files.

◆ fileSize

int agora::rtc::LogConfig::fileSize

The size (KB) of a log file. The default value is 1024 KB. If you set fileSize to 1024 KB, the SDK outputs at most 5 MB log files; if you set it to less than 1024 KB, the setting is invalid, and the maximum size of a log file is still 1024 KB.

◆ level

LOG_LEVEL agora::rtc::LogConfig::level

The output log level of the SDK. See LOG_LEVEL.

For example, if you set the log level to WARN, the SDK outputs the logs within levels FATAL, ERROR, and WARN.