void haze_debug (const gchar *format, ...) { gchar *message; va_list args; va_start (args, format); message = g_strdup_vprintf (format, args); va_end (args); log_to_debug_sender (G_LOG_DOMAIN "/haze", G_LOG_LEVEL_DEBUG, message); if (flags & HAZE_DEBUG_HAZE) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s", message); g_free (message); }
static void haze_debug_print (PurpleDebugLevel level, const char *category, const char *arg_s) { gchar *argh = g_strchomp (g_strdup (arg_s)); gchar *domain = g_strdup_printf ("purple/%s", category); GLogLevelFlags log_level = debug_level_map[level]; /* The default log handler catches g_log. Calling log_to_debug_sender * and g_log duplicates debug messages */ if (flags & HAZE_DEBUG_PURPLE) g_log (domain, log_level, "%s", argh); else log_to_debug_sender (domain, log_level, argh); g_free (domain); g_free(argh); }
void empathy_debug (EmpathyDebugFlags flag, const gchar *format, ...) { gchar *message; va_list args; va_start (args, format); message = g_strdup_vprintf (format, args); va_end (args); log_to_debug_sender (flag, message); if (flag & flags) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s", message); g_free (message); }