[brasero] brasero-misc: tweak BRASERO_UTILS_LOG to behave more conformantly



commit 0ade622575ecd3750d6d393200354d187f9e349d
Author: Joshua Lock <joshua lock intel com>
Date:   Wed Aug 21 15:49:26 2013 +0100

    brasero-misc: tweak BRASERO_UTILS_LOG to behave more conformantly
    
    BRASERO_UTILS_LOG should behave similarly to BRASERO_BURN_LOG and
    BRASERO_MEDIA_LOG, writing to stdout using printf rather than using glogv
    with a utils specific log domain.
    
    In future all three macros should use GLib's logging functionality

 libbrasero-utils/brasero-misc.c |   10 +++-------
 libbrasero-utils/brasero-misc.h |    8 ++------
 2 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/libbrasero-utils/brasero-misc.c b/libbrasero-utils/brasero-misc.c
index 9b6180f..ae7afec 100644
--- a/libbrasero-utils/brasero-misc.c
+++ b/libbrasero-utils/brasero-misc.c
@@ -76,8 +76,7 @@ brasero_utils_set_use_debug (gboolean active)
 }
 
 void
-brasero_utils_debug_message (const gchar *domain,
-                            const gchar *location,
+brasero_utils_debug_message (const gchar *location,
                             const gchar *format,
                             ...)
 {
@@ -87,15 +86,12 @@ brasero_utils_debug_message (const gchar *domain,
        if (!use_debug)
                return;
 
-       format_real = g_strdup_printf ("At %s: %s",
+       format_real = g_strdup_printf ("BraseroUtils: (at %s) %s\n",
                                       location,
                                       format);
 
        va_start (arg_list, format);
-       g_logv (domain,
-               G_LOG_LEVEL_DEBUG,
-               format_real,
-               arg_list);
+       vprintf (format_real, arg_list);
        va_end (arg_list);
 
        g_free (format_real);
diff --git a/libbrasero-utils/brasero-misc.h b/libbrasero-utils/brasero-misc.h
index aeed2ca..6960cd2 100644
--- a/libbrasero-utils/brasero-misc.h
+++ b/libbrasero-utils/brasero-misc.h
@@ -49,20 +49,16 @@ typedef enum {
        BRASERO_UTILS_ERROR_SYMLINK_LOOP
 } BraseroUtilsErrors;
 
-#define BRASERO_UTILS_LOG_DOMAIN                       "BraseroUtils"
-
 void
 brasero_utils_set_use_debug (gboolean active);
 
 void
-brasero_utils_debug_message (const gchar *domain,
-                            const gchar *location,
+brasero_utils_debug_message (const gchar *location,
                             const gchar *format,
                             ...);
 
 #define BRASERO_UTILS_LOG(format, ...)                                         \
-       brasero_utils_debug_message (BRASERO_UTILS_LOG_DOMAIN,                  \
-                                    G_STRLOC,                                  \
+       brasero_utils_debug_message (G_STRLOC,                                  \
                                     format,                                    \
                                     ##__VA_ARGS__);
 


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