Documentation

Support

Vivox Core SDK

Vivox Core SDK

Vivox Client SDK logs

Learn about client SDK basics.
Read time 1 minuteLast updated 20 hours ago

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));