Hook into Tox logs if built without NDEBUG

This also requires libtoxcore to be built with logging enabled.
This commit is contained in:
Håvard Pettersson
2017-02-09 22:04:39 -08:00
parent 4c8c4f598d
commit bf095ecc5b
3 changed files with 51 additions and 0 deletions

View File

@ -208,6 +208,11 @@ twc_profile_set_options(struct Tox_Options *options,
TWC_PROFILE_OPTION_BOOLEAN(profile, TWC_PROFILE_OPTION_UDP);
options->ipv6_enabled =
TWC_PROFILE_OPTION_BOOLEAN(profile, TWC_PROFILE_OPTION_IPV6);
#ifndef NDEBUG
options->log_callback = twc_tox_log_callback;
options->log_user_data = profile;
#endif /* !NDEBUG */
}
void