[tracker/sam/debug-more: 3/8] Move some debug output to TRACKER_DEBUG=collation



commit f24a8b9117c24c231f18ec85a7c1f86c232b2999
Author: Sam Thursfield <sam afuera me uk>
Date:   Sun Apr 26 00:28:15 2020 +0200

    Move some debug output to TRACKER_DEBUG=collation

 src/libtracker-data/tracker-collation.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/libtracker-data/tracker-collation.c b/src/libtracker-data/tracker-collation.c
index 3fedbe326..beca29e3b 100644
--- a/src/libtracker-data/tracker-collation.c
+++ b/src/libtracker-data/tracker-collation.c
@@ -23,16 +23,16 @@
 #include <string.h>
 #include <locale.h>
 
+#include <libtracker-common/tracker-debug.h>
 #include <libtracker-common/tracker-locale.h>
 #include "tracker-collation.h"
 
 /* If defined, will dump additional traces */
-#ifdef ENABLE_TRACE
-#define trace(message, ...) \
-       g_debug (message, ##__VA_ARGS__)
+#ifdef G_ENABLE_DEBUG
+#define trace(message, ...) TRACKER_NOTE (COLLATION, g_message (message, ##__VA_ARGS__))
 #else
 #define trace(...)
-#endif /* ENABLE_TRACE */
+#endif
 
 #ifdef HAVE_LIBUNISTRING
 /* libunistring versions prior to 9.1.2 need this hack */
@@ -55,7 +55,7 @@ tracker_collation_init (void)
 
        /* Get locale! */
        locale = tracker_locale_get (TRACKER_LOCALE_COLLATE);
-       g_debug ("[libunistring collation] Initializing collator for locale '%s'", locale);
+       TRACKER_NOTE (COLLATION, g_message ("[libunistring collation] Initializing collator for locale '%s'", 
locale));
        g_free (locale);
        /* Nothing to do */
        return NULL;
@@ -109,7 +109,7 @@ tracker_collation_init (void)
        /* Get locale! */
        locale = tracker_locale_get (TRACKER_LOCALE_COLLATE);
 
-       g_debug ("[ICU collation] Initializing collator for locale '%s'", locale);
+       TRACKER_NOTE (COLLATION, g_message ("[ICU collation] Initializing collator for locale '%s'", locale));
        collator = ucol_open (locale, &status);
        if (!collator) {
                g_warning ("[ICU collation] Collator for locale '%s' cannot be created: %s",
@@ -197,7 +197,7 @@ tracker_collation_init (void)
 
        /* Get locale! */
        locale = tracker_locale_get (TRACKER_LOCALE_COLLATE);
-       g_debug ("[GLib collation] Initializing collator for locale '%s'", locale);
+       TRACKER_NOTE (COLLATION, g_message ("[GLib collation] Initializing collator for locale '%s'", 
locale));
        g_free (locale);
        /* Nothing to do */
        return NULL;


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