ドキュメント

サポート

Vivox Core SDK

Vivox Core SDK

Vivox Client SDK logs

Learn about client SDK basics.
読み終わるまでの所要時間 1 分最終更新 2ヶ月前

The Vivox SDK produces log information that is useful for diagnosing issues both during development and in the field. We recommend that you include Vivox log information in the application logs that are sent to Vivox. The game client can get Vivox log information through a callback that is set during
vx_initialize3()
.
The
vx_log_level
enum includes the following values:
  • log_none = -1
  • log_error = 0
  • log_warning = 1
  • log_info = 2
  • log_debug = 3
  • log_trace = 4
  • log_all = 5
The following code displays an example of how to get Vivox SDK log information:
void OnLog(void *callback_handle, vx_log_level level, const char *source, const char *message){ // The following line is for demonstration only. Because fprintf can block, do not call it from any SDK callback. fprintf(stderr, "%s: %s\n", vx_get_log_level_string(level), message);}. . .vx_sdk_config_t config;vx_get_default_config3(&config, sizeof(config));config.pf_logging_callback = OnLog;vx_initialize3(&config, sizeof(config));
The
pf_logging_callback
method is called directly from Vivox SDK threads. This callback must not block, otherwise, the user's audio experience could be negatively impacted. Applications that use
pf_logging_called
must call it immediately after initializing the Vivox SDK.