# HG changeset patch # User Elliott Sales de Andrade # Date 1634622381 18000 # Node ID 85ddac53ef14082d0c6694e14b8516dba63bf235 # Parent 02abf31706109f70af1277b3cbc6a360550bde63 Use GLib logging system in nullclient Testing Done: Compile only. Reviewed at https://reviews.imfreedom.org/r/1075/ diff -r 02abf3170610 -r 85ddac53ef14 libpurple/example/nullclient.c --- a/libpurple/example/nullclient.c Tue Oct 19 00:41:44 2021 -0500 +++ b/libpurple/example/nullclient.c Tue Oct 19 00:46:21 2021 -0500 @@ -36,6 +36,16 @@ #include "defines.h" +static GLogWriterOutput +nullclient_g_log_handler(G_GNUC_UNUSED GLogLevelFlags log_level, + G_GNUC_UNUSED const GLogField *fields, + G_GNUC_UNUSED gsize n_fields, + G_GNUC_UNUSED gpointer user_data) +{ + /* We do not want any debugging for now to keep the noise to a minimum. */ + return G_LOG_WRITER_HANDLED; +} + /*** Conversation uiops ***/ static void null_write_conv(PurpleConversation *conv, PurpleMessage *msg) @@ -78,7 +88,7 @@ purple_util_set_user_dir(CUSTOM_USER_DIRECTORY); /* We do not want any debugging for now to keep the noise to a minimum. */ - purple_debug_set_enabled(FALSE); + g_log_set_writer_func(nullclient_g_log_handler, NULL, NULL); /* Set the core-uiops, which is used to * - initialize the ui specific preferences.