util: Remove unused logging functions

They are tunneled through g_message() now.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2094>
This commit is contained in:
Jonas Ådahl 2021-11-15 19:43:43 +01:00 committed by Marge Bot
parent e280589661
commit 4bb8b2a9f3
2 changed files with 0 additions and 73 deletions

View File

@ -74,13 +74,6 @@ static const GDebugKey meta_debug_keys[] = {
{ "render", META_DEBUG_RENDER }, { "render", META_DEBUG_RENDER },
}; };
#ifdef WITH_VERBOSE_MODE
static void
meta_topic_real_valist (MetaDebugTopic topic,
const char *format,
va_list args) G_GNUC_PRINTF(2, 0);
#endif
static gint verbose_topics = 0; static gint verbose_topics = 0;
static gboolean is_wayland_compositor = FALSE; static gboolean is_wayland_compositor = FALSE;
static int debug_paint_flags = 0; static int debug_paint_flags = 0;
@ -264,16 +257,6 @@ utf8_fputs (const char *str,
} }
#ifdef WITH_VERBOSE_MODE #ifdef WITH_VERBOSE_MODE
void
meta_verbose_real (const char *format, ...)
{
va_list args;
va_start (args, format);
meta_topic_real_valist (META_DEBUG_VERBOSE, format, args);
va_end (args);
}
const char * const char *
meta_topic_to_string (MetaDebugTopic topic) meta_topic_to_string (MetaDebugTopic topic)
{ {
@ -338,8 +321,6 @@ meta_topic_to_string (MetaDebugTopic topic)
return "WM"; return "WM";
} }
static int sync_count = 0;
gboolean gboolean
meta_is_topic_enabled (MetaDebugTopic topic) meta_is_topic_enabled (MetaDebugTopic topic)
{ {
@ -351,51 +332,6 @@ meta_is_topic_enabled (MetaDebugTopic topic)
return !!(verbose_topics & topic); return !!(verbose_topics & topic);
} }
static void
meta_topic_real_valist (MetaDebugTopic topic,
const char *format,
va_list args)
{
gchar *str;
FILE *out;
g_return_if_fail (format != NULL);
if (!meta_is_topic_enabled (topic))
return;
str = g_strdup_vprintf (format, args);
out = logfile ? logfile : stderr;
fprintf (out, "%s: ", meta_topic_to_string (topic));
if (topic == META_DEBUG_SYNC)
{
++sync_count;
fprintf (out, "%d: ", sync_count);
}
utf8_fputs (str, out);
utf8_fputs ("\n", out);
fflush (out);
g_free (str);
}
void
meta_topic_real (MetaDebugTopic topic,
const char *format,
...)
{
va_list args;
va_start (args, format);
meta_topic_real_valist (topic, format, args);
va_end (args);
}
#endif /* WITH_VERBOSE_MODE */ #endif /* WITH_VERBOSE_MODE */
void void

View File

@ -38,10 +38,6 @@ gboolean meta_is_syncing (void);
META_EXPORT META_EXPORT
gboolean meta_is_wayland_compositor (void); gboolean meta_is_wayland_compositor (void);
META_EXPORT
void meta_verbose_real (const char *format,
...) G_GNUC_PRINTF (1, 2);
META_EXPORT META_EXPORT
void meta_bug (const char *format, void meta_bug (const char *format,
...) G_GNUC_PRINTF (1, 2); ...) G_GNUC_PRINTF (1, 2);
@ -127,11 +123,6 @@ typedef enum
META_EXPORT META_EXPORT
gboolean meta_is_topic_enabled (MetaDebugTopic topic); gboolean meta_is_topic_enabled (MetaDebugTopic topic);
META_EXPORT
void meta_topic_real (MetaDebugTopic topic,
const char *format,
...) G_GNUC_PRINTF (2, 3);
META_EXPORT META_EXPORT
void meta_add_verbose_topic (MetaDebugTopic topic); void meta_add_verbose_topic (MetaDebugTopic topic);