Agora C++ API Reference for All Platforms

Loading...
Searching...
No Matches
Namespaces | Classes | Enumerations | Functions | Variables
agora::commons Namespace Reference

## Namespaces
namespace | cjson
namespace | network

## Classes
class | ILogWriter
struct | LogConfig

## Enumerations
enum | log_filters { AGORA_LOG_NONE = 0x0000 , AGORA_LOG_INFO = 0x0001 , AGORA_LOG_WARN = 0x0002 , AGORA_LOG_ERROR = 0x0004 , AGORA_LOG_FATAL = 0x0008 , AGORA_LOG_DEFAULT = 0x000f , AGORA_LOG_API_CALL = 0x0010 , AGORA_LOG_MODULE_CALL = 0x0020 , AGORA_LOG_QUALITY = 0x0040 , AGORA_LOG_DIAGNOSE = 0x0080 , AGORA_LOG_MEM = 0x0100 , AGORA_LOG_TIMER = 0x0200 , AGORA_LOG_STREAM = 0x0400 , AGORA_LOG_DEBUG = 0x0800 , AGORA_LOG_USER_API_CALL = 0x1000 , AGORA_LOG_CONSOLE = 0x8000 , AGORA_LOG_ALL = 0xffff , AGORA_LOG_NO_API = 0xefef , AGORA_LOG_INVALID = (int32_t)-1 }
enum | LOG_FILTER_TYPE { LOG_FILTER_OFF = 0 , LOG_FILTER_DEBUG = 0x080f , LOG_FILTER_INFO = 0x000f , LOG_FILTER_WARN = 0x000e , LOG_FILTER_ERROR = 0x000c , LOG_FILTER_CRITICAL = 0x0008 , LOG_FILTER_MASK = 0x80f }

## Functions
| __attribute__ ((format(printf, 2, 3))) void log(log_filters level
const char void | logv (log_filters level, const char *fmt, va_list ap)

## Variables
const char * | fmt
OPTIONAL_ENUM_CLASS | LOG_LEVEL
const uint32_t | MAX_LOG_SIZE = 20 * 1024 * 1024
const uint32_t | MIN_LOG_SIZE = 128 * 1024
const uint32_t | DEFAULT_LOG_SIZE_IN_KB = 2048

## Enumeration Type Documentation

## ◆ log_filters

enum agora::commons::log_filters

Enumerator
AGORA_LOG_NONE |
AGORA_LOG_INFO |
AGORA_LOG_WARN |
AGORA_LOG_ERROR |
AGORA_LOG_FATAL |
AGORA_LOG_DEFAULT |
AGORA_LOG_API_CALL |
AGORA_LOG_MODULE_CALL |
AGORA_LOG_QUALITY |
AGORA_LOG_DIAGNOSE |
AGORA_LOG_MEM |
AGORA_LOG_TIMER |
AGORA_LOG_STREAM |
AGORA_LOG_DEBUG |
AGORA_LOG_USER_API_CALL |
AGORA_LOG_CONSOLE |
AGORA_LOG_ALL |
AGORA_LOG_NO_API |
AGORA_LOG_INVALID |

## ◆ LOG_FILTER_TYPE

enum agora::commons::LOG_FILTER_TYPE

The output log level of the SDK.

Enumerator
LOG_FILTER_OFF | 0: Do not output any log information.
LOG_FILTER_DEBUG | 0x080f: Output all log information. Set your log filter to this level if you want to get the most complete log file.
LOG_FILTER_INFO | 0x000f: Output `LOG_FILTER_CRITICAL`, `LOG_FILTER_ERROR`, `LOG_FILTER_WARN`, and `LOG_FILTER_INFO` level log information. We recommend setting your log filter to this level.
LOG_FILTER_WARN | 0x000e: Output `LOG_FILTER_CRITICAL`, `LOG_FILTER_ERROR`, and `LOG_FILTER_WARN` level log information.
LOG_FILTER_ERROR | 0x000c: Output `LOG_FILTER_CRITICAL` and `LOG_FILTER_ERROR` level log information.
LOG_FILTER_CRITICAL | 0x0008: Output `LOG_FILTER_CRITICAL` level log information.
LOG_FILTER_MASK |

## Function Documentation

## ◆ __attribute__()

agora::commons::__attribute__ | ( | (format(printf, 2, 3)) |  | ) |

## ◆ logv()

const char void agora::commons::logv | ( | log_filters | level,
|  | const char * | fmt,
|  | va_list | ap )

## Variable Documentation

## ◆ fmt

const char* agora::commons::fmt

## ◆ LOG_LEVEL

OPTIONAL_ENUM_CLASS agora::commons::LOG_LEVEL

Initial value:
{
LOG_LEVEL_NONE = 0x0000,
LOG_LEVEL_INFO = 0x0001,
LOG_LEVEL_WARN = 0x0002,
LOG_LEVEL_ERROR = 0x0004,
LOG_LEVEL_FATAL = 0x0008,
LOG_LEVEL_API_CALL = 0x0010,
LOG_LEVEL_DEBUG = 0x0020,
}

The output log level of the SDK.

## ◆ MAX_LOG_SIZE

const uint32_t agora::commons::MAX_LOG_SIZE = 20 * 1024 * 1024

## ◆ MIN_LOG_SIZE

const uint32_t agora::commons::MIN_LOG_SIZE = 128 * 1024

## ◆ DEFAULT_LOG_SIZE_IN_KB

const uint32_t agora::commons::DEFAULT_LOG_SIZE_IN_KB = 2048

The default log size in kb