[mutter] util: Add back topic prefix to meta_topic() messages



commit 50ccab567fe1be1c7dad13064d0ebe38bcc4c2fc
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Tue Nov 30 12:16:48 2021 +0100

    util: Add back topic prefix to meta_topic() messages
    
    Was lost when changing to use g_message(); lets add it back.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2125>

 src/meta/util.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/meta/util.h b/src/meta/util.h
index 1df30f2e14..c44a63fc87 100644
--- a/src/meta/util.h
+++ b/src/meta/util.h
@@ -175,7 +175,10 @@ const char * meta_topic_to_string (MetaDebugTopic topic);
     { \
       if (meta_is_topic_enabled (debug_topic)) \
         { \
-          g_message (__VA_ARGS__); \
+          g_autofree char *message = NULL; \
+\
+          message = g_strdup_printf (__VA_ARGS__); \
+          g_message ("%s: %s", meta_topic_to_string (debug_topic), message); \
         } \
     } \
   G_STMT_END


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]