[gnome-color-manager] Migrate away from EggDebug and use the builtin GLib logging framework



commit c60e650dc8b2f9533582d9b710aca3fb75adeb04
Author: Richard Hughes <richard hughsie com>
Date:   Sat Oct 16 10:20:07 2010 +0100

    Migrate away from EggDebug and use the builtin GLib logging framework

 libcolor-glib/Makefile.am             |    5 +-
 libcolor-glib/egg-debug.c             |    1 -
 libcolor-glib/egg-debug.h             |    1 -
 libcolor-glib/gcm-brightness.c        |    2 -
 libcolor-glib/gcm-clut.c              |    4 +-
 libcolor-glib/gcm-ddc-client.c        |    6 +-
 libcolor-glib/gcm-ddc-control.c       |    6 +-
 libcolor-glib/gcm-ddc-device.c        |   16 +-
 libcolor-glib/gcm-debug.c             |  165 +++++++++++
 libcolor-glib/gcm-debug.h             |   37 +++
 libcolor-glib/gcm-dmi.c               |    5 +-
 libcolor-glib/gcm-edid.c              |   39 ++--
 libcolor-glib/gcm-image.c             |   26 +-
 libcolor-glib/gcm-profile-store.c     |   28 +-
 libcolor-glib/gcm-profile.c           |   26 +-
 libcolor-glib/gcm-sample-window.c     |    4 +-
 libcolor-glib/gcm-self-test.c         |    5 -
 libcolor-glib/gcm-sensor-client.c     |   16 +-
 libcolor-glib/gcm-sensor-colormunki.c |   38 +--
 libcolor-glib/gcm-sensor-dummy.c      |    1 -
 libcolor-glib/gcm-sensor-huey.c       |   25 +-
 libcolor-glib/gcm-sensor.c            |    7 +-
 libcolor-glib/gcm-tables.c            |    6 +-
 libcolor-glib/gcm-usb.c               |   14 +-
 libcolor-glib/gcm-x11-output.c        |    7 +-
 libcolor-glib/gcm-x11-screen.c        |   18 +-
 libcolor-glib/libcolor-glib.h         |    5 +
 po/POTFILES.in                        |    2 +-
 src/Makefile.am                       |    3 +-
 src/cc-color-panel.c                  |  123 ++++-----
 src/egg-debug.c                       |  503 ---------------------------------
 src/egg-debug.h                       |   83 ------
 src/gcm-apply.c                       |   23 +-
 src/gcm-calibrate-argyll.c            |   50 ++--
 src/gcm-calibrate-dialog.c            |   14 +-
 src/gcm-calibrate-manual.c            |   23 +-
 src/gcm-calibrate-native.c            |   28 +-
 src/gcm-calibrate.c                   |   16 +-
 src/gcm-cell-renderer-profile-icon.c  |    2 -
 src/gcm-cell-renderer-profile-text.c  |    2 -
 src/gcm-cie-widget.c                  |    2 -
 src/gcm-client.c                      |   84 +++---
 src/gcm-device-cups.c                 |   17 +-
 src/gcm-device-sane.c                 |   12 +-
 src/gcm-device-udev.c                 |    3 -
 src/gcm-device-virtual.c              |    4 +-
 src/gcm-device-xrandr.c               |    6 +-
 src/gcm-device.c                      |   19 +-
 src/gcm-exif.c                        |    2 -
 src/gcm-gamma-widget.c                |    2 -
 src/gcm-import.c                      |    5 +-
 src/gcm-inspect.c                     |   17 +-
 src/gcm-picker.c                      |   18 +-
 src/gcm-print.c                       |   14 +-
 src/gcm-self-test.c                   |    4 +
 src/gcm-session.c                     |   36 ++--
 src/gcm-trc-widget.c                  |    2 -
 src/gcm-utils.c                       |   10 +-
 src/gcm-viewer.c                      |   31 +-
 tools/Makefile.am                     |    5 +-
 tools/egg-debug.c                     |    1 -
 tools/egg-debug.h                     |    1 -
 tools/gcm-ddc-util.c                  |    4 +-
 tools/gcm-dump-edid.c                 |    1 +
 tools/gcm-dump-profile.c              |    1 +
 tools/gcm-dump-sensor.c               |    2 +
 tools/gcm-sensor-example.c            |    8 +-
 67 files changed, 601 insertions(+), 1095 deletions(-)
---
diff --git a/libcolor-glib/Makefile.am b/libcolor-glib/Makefile.am
index 1221a1f..338ca29 100644
--- a/libcolor-glib/Makefile.am
+++ b/libcolor-glib/Makefile.am
@@ -14,6 +14,7 @@ INCLUDES = \
 	-I$(top_srcdir)/libcolor-glib				\
 	-I$(top_builddir)/libcolor-glib				\
 	-I.							\
+	-DG_LOG_DOMAIN=\"Gcm\"					\
 	-DLIBCOLOR_GLIB_COMPILATION				\
 	-DLOCALSTATEDIR=\""$(localstatedir)"\" 			\
 	-DTESTDATADIR=\""$(top_srcdir)/data/tests"\"		\
@@ -53,8 +54,8 @@ libcolor_glib_include_HEADERS =					\
 
 libcolor_glib_la_SOURCES =					\
 	libcolor-glib.h						\
-	egg-debug.c						\
-	egg-debug.h						\
+	gcm-debug.c						\
+	gcm-debug.h						\
 	gcm-sample-window.c					\
 	gcm-sample-window.h					\
 	gcm-math.c						\
diff --git a/libcolor-glib/gcm-brightness.c b/libcolor-glib/gcm-brightness.c
index 86a5bba..681aabb 100644
--- a/libcolor-glib/gcm-brightness.c
+++ b/libcolor-glib/gcm-brightness.c
@@ -33,8 +33,6 @@
 
 #include "gcm-brightness.h"
 
-#include "egg-debug.h"
-
 static void     gcm_brightness_finalize	(GObject     *object);
 
 #define GCM_BRIGHTNESS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_BRIGHTNESS, GcmBrightnessPrivate))
diff --git a/libcolor-glib/gcm-clut.c b/libcolor-glib/gcm-clut.c
index d6eeae9..ff87012 100644
--- a/libcolor-glib/gcm-clut.c
+++ b/libcolor-glib/gcm-clut.c
@@ -35,8 +35,6 @@
 
 #include "gcm-clut.h"
 
-#include "egg-debug.h"
-
 static void     gcm_clut_finalize	(GObject     *object);
 
 #define GCM_CLUT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_CLUT, GcmClutPrivate))
@@ -186,7 +184,7 @@ gcm_clut_get_array (GcmClut *clut)
 	array = g_ptr_array_new_with_free_func (g_free);
 	if (clut->priv->array->len == 0) {
 		/* generate a dummy gamma */
-		egg_debug ("falling back to dummy gamma");
+		g_debug ("falling back to dummy gamma");
 		for (i=0; i<clut->priv->size; i++) {
 			value = (i * 0xffff) / (clut->priv->size - 1);
 			data = g_new0 (GcmClutData, 1);
diff --git a/libcolor-glib/gcm-ddc-client.c b/libcolor-glib/gcm-ddc-client.c
index 991900a..e4b9bab 100644
--- a/libcolor-glib/gcm-ddc-client.c
+++ b/libcolor-glib/gcm-ddc-client.c
@@ -35,8 +35,6 @@
 #include <gcm-ddc-client.h>
 #include <gcm-ddc-device.h>
 
-#include "egg-debug.h"
-
 static void     gcm_ddc_client_finalize	(GObject     *object);
 
 #define GCM_DDC_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_DDC_CLIENT, GcmDdcClientPrivate))
@@ -101,11 +99,11 @@ gcm_ddc_client_ensure_coldplug (GcmDdcClient *client, GError **error)
 		ret = gcm_ddc_device_open (device, filename, &error_local);
 		if (!ret) {
 			if (client->priv->verbose >= GCM_VERBOSE_OVERVIEW)
-				egg_debug ("failed to open %s: %s", filename, error_local->message);
+				g_debug ("failed to open %s: %s", filename, error_local->message);
 			g_clear_error (&error_local);
 		} else {
 			if (client->priv->verbose >= GCM_VERBOSE_OVERVIEW)
-				egg_debug ("success, adding %s", filename);
+				g_debug ("success, adding %s", filename);
 			any_found = TRUE;
 			g_ptr_array_add (client->priv->devices, g_object_ref (device));
 		}
diff --git a/libcolor-glib/gcm-ddc-control.c b/libcolor-glib/gcm-ddc-control.c
index 1d2f3fd..539d2d4 100644
--- a/libcolor-glib/gcm-ddc-control.c
+++ b/libcolor-glib/gcm-ddc-control.c
@@ -34,8 +34,6 @@
 #include <gcm-ddc-device.h>
 #include <gcm-ddc-control.h>
 
-#include "egg-debug.h"
-
 static void     gcm_ddc_control_finalize	(GObject     *object);
 
 #define GCM_DDC_CONTROL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_DDC_CONTROL, GcmDdcControlPrivate))
@@ -314,7 +312,7 @@ gcm_ddc_control_parse (GcmDdcControl *control, guchar id, const gchar *values)
 	/* just save this */
 	control->priv->id = id;
 	if (control->priv->verbose == GCM_VERBOSE_OVERVIEW)
-		egg_debug ("add control 0x%02x (%s)", id, gcm_ddc_control_get_description (control));
+		g_debug ("add control 0x%02x (%s)", id, gcm_ddc_control_get_description (control));
 
 	/* do we have any values to parse */
 	if (values == NULL)
@@ -325,7 +323,7 @@ gcm_ddc_control_parse (GcmDdcControl *control, guchar id, const gchar *values)
 	for (i=0; split[i] != NULL; i++) {
 		value = atoi (split[i]);
 		if (control->priv->verbose == GCM_VERBOSE_OVERVIEW)
-			egg_debug ("add value %i to control 0x%02x", value, id);
+			g_debug ("add value %i to control 0x%02x", value, id);
 		g_array_append_val (control->priv->values, value);
 	}
 out:
diff --git a/libcolor-glib/gcm-ddc-device.c b/libcolor-glib/gcm-ddc-device.c
index 1c459d8..ce91b4b 100644
--- a/libcolor-glib/gcm-ddc-device.c
+++ b/libcolor-glib/gcm-ddc-device.c
@@ -45,8 +45,6 @@
 #include <gcm-ddc-device.h>
 #include <gcm-ddc-control.h>
 
-#include "egg-debug.h"
-
 static void     gcm_ddc_device_finalize	(GObject     *object);
 
 #define GCM_DDC_DEVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_DDC_DEVICE, GcmDdcDevicePrivate))
@@ -389,7 +387,7 @@ gcm_ddc_device_read (GcmDdcDevice *device, guchar *data, gsize data_length, gsiz
 
 	if ((buf[1] & GCM_MAGIC_BYTE2) == 0) {
 		/* Fujitsu Siemens P19-2 and NEC LCD 1970NX send wrong magic when reading caps. */
-		egg_debug ( "Invalid response, magic is 0x%02x, correcting", buf[1]);
+		g_debug ( "Invalid response, magic is 0x%02x, correcting", buf[1]);
 	}
 
 	len = buf[1] & ~GCM_MAGIC_BYTE2;
@@ -477,7 +475,7 @@ static gboolean
 gcm_ddc_device_set_device_property (GcmDdcDevice *device, const gchar *key, const gchar *value)
 {
 	if (device->priv->verbose >= GCM_VERBOSE_OVERVIEW)
-		egg_debug ("key=%s, value=%s", key, value);
+		g_debug ("key=%s, value=%s", key, value);
 	if (g_strcmp0 (key, "type") == 0) {
 		if (g_strcmp0 (value, "lcd") == 0)
 			device->priv->kind = GCM_DDC_DEVICE_KIND_LCD;
@@ -580,7 +578,7 @@ gcm_ddc_device_ensure_controls (GcmDdcDevice *device, GError **error)
 		ret = gcm_ddc_device_capabilities_request (device, offset, buf, sizeof(buf), &len, error);
 		if (!ret) {
 			if (device->priv->verbose >= GCM_VERBOSE_PROTOCOL)
-				egg_warning ("Failed to read capabilities offset 0x%02x.", offset);
+				g_warning ("Failed to read capabilities offset 0x%02x.", offset);
 			retries--;
 			continue;
 		}
@@ -588,7 +586,7 @@ gcm_ddc_device_ensure_controls (GcmDdcDevice *device, GError **error)
 		/* not enough data */
 		if (len < 3) {
 			if (device->priv->verbose >= GCM_VERBOSE_PROTOCOL)
-				egg_debug ("Not enough capabilities data at offset 0x%02x.", offset);
+				g_debug ("Not enough capabilities data at offset 0x%02x.", offset);
 			retries--;
 			continue;
 		}
@@ -596,7 +594,7 @@ gcm_ddc_device_ensure_controls (GcmDdcDevice *device, GError **error)
 		/* check response */
 		if (buf[0] != GCM_CAPABILITIES_REPLY) {
 			if (device->priv->verbose == GCM_VERBOSE_PROTOCOL)
-				egg_warning ("Not correct capabilities reply at offset 0x%02x.", offset);
+				g_warning ("Not correct capabilities reply at offset 0x%02x.", offset);
 			retries--;
 			continue;
 		}
@@ -604,7 +602,7 @@ gcm_ddc_device_ensure_controls (GcmDdcDevice *device, GError **error)
 		/* check offset */
 		if ((buf[1] * 256 + buf[2]) != offset) {
 			if (device->priv->verbose == GCM_VERBOSE_PROTOCOL)
-				egg_warning ("Not correct capabilities offset at offset 0x%02x.", offset);
+				g_warning ("Not correct capabilities offset at offset 0x%02x.", offset);
 			retries--;
 			continue;
 		}
@@ -616,7 +614,7 @@ gcm_ddc_device_ensure_controls (GcmDdcDevice *device, GError **error)
 	} while (len != 3);
 
 	if (device->priv->verbose == GCM_VERBOSE_OVERVIEW)
-		egg_debug ("raw caps: %s", string->str);
+		g_debug ("raw caps: %s", string->str);
 
 	/* parse */
 	ret = gcm_ddc_device_parse_caps (device, string->str);
diff --git a/libcolor-glib/gcm-debug.c b/libcolor-glib/gcm-debug.c
new file mode 100644
index 0000000..500a766
--- /dev/null
+++ b/libcolor-glib/gcm-debug.c
@@ -0,0 +1,165 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2010 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <glib/gi18n.h>
+#include <unistd.h>
+#include <stdio.h>
+
+#include <gcm-debug.h>
+
+static gboolean _verbose = FALSE;
+static gboolean _console = FALSE;
+
+/**
+ * gcm_debug_is_verbose:
+ *
+ * Returns: TRUE if we have debugging enabled
+ **/
+gboolean
+gcm_debug_is_verbose (void)
+{
+	/* local first */
+	if (_verbose)
+		 return TRUE;
+
+	/* fall back to env variable */
+	if (g_getenv ("VERBOSE") != NULL)
+		 return TRUE;
+	return FALSE;
+}
+
+
+/**
+ * gcm_debug_ignore_cb:
+ **/
+static void
+gcm_debug_ignore_cb (const gchar *log_domain, GLogLevelFlags log_level,
+		     const gchar *message, gpointer user_data)
+{
+}
+
+/**
+ * gcm_debug_handler_cb:
+ **/
+static void
+gcm_debug_handler_cb (const gchar *log_domain, GLogLevelFlags log_level,
+		      const gchar *message, gpointer user_data)
+{
+	gchar str_time[255];
+	time_t the_time;
+
+	/* time header */
+	time (&the_time);
+	strftime (str_time, 254, "%H:%M:%S", localtime (&the_time));
+
+	/* no color please, we're British */
+	if (!_console) {
+		if (log_level == G_LOG_LEVEL_DEBUG) {
+			g_print ("%s\t%s\n", str_time, message);
+		} else {
+			g_print ("***\n%s\t%s\n***\n", str_time, message);
+		}
+		return;
+	}
+
+	/* critical is also in red */
+	if (log_level == G_LOG_LEVEL_CRITICAL ||
+	    log_level == G_LOG_LEVEL_ERROR) {
+		g_print ("%c[%dm%s\t", 0x1B, 32, str_time);
+		g_print ("%c[%dm%s\n%c[%dm", 0x1B, 31, message, 0x1B, 0);
+	} else {
+		/* debug in blue */
+		g_print ("%c[%dm%s\t", 0x1B, 32, str_time);
+		g_print ("%c[%dm%s\n%c[%dm", 0x1B, 34, message, 0x1B, 0);
+	}
+}
+
+/**
+ * gcm_debug_pre_parse_hook:
+ */
+static gboolean
+gcm_debug_pre_parse_hook (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error)
+{
+	const GOptionEntry main_entries[] = {
+		{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &_verbose,
+		  /* TRANSLATORS: turn on all debugging */
+		  N_("Show debugging information for all files"), NULL },
+		{ NULL}
+	};
+
+	/* add main entry */
+	g_option_context_add_main_entries (context, main_entries, NULL);
+	return TRUE;
+}
+
+/**
+ * gcm_debug_setup:
+ */
+void
+gcm_debug_setup (gboolean enabled)
+{
+	if (enabled) {
+		g_log_set_fatal_mask (NULL, G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL);
+		g_log_set_handler (G_LOG_DOMAIN,
+				   G_LOG_LEVEL_ERROR |
+				   G_LOG_LEVEL_CRITICAL |
+				   G_LOG_LEVEL_DEBUG |
+				   G_LOG_LEVEL_WARNING,
+				   gcm_debug_handler_cb, NULL);
+	} else {
+		/* hide all debugging */
+		g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
+				   gcm_debug_ignore_cb, NULL);
+	}
+}
+
+/**
+ * gcm_debug_post_parse_hook:
+ */
+static gboolean
+gcm_debug_post_parse_hook (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error)
+{
+	/* verbose? */
+	gcm_debug_setup (_verbose);
+	_console = (isatty (fileno (stdout)) == 1);
+	g_debug ("Verbose debugging %s (on console %i)", _verbose ? "enabled" : "disabled", _console);
+	return TRUE;
+}
+
+/**
+ * gcm_debug_get_option_group:
+ *
+ * Returns a #GOptionGroup for the commandline arguments recognized
+ * by debugging. You should add this group to your #GOptionContext
+ * with g_option_context_add_group(), if you are using
+ * g_option_context_parse() to parse your commandline arguments.
+ *
+ * Returns: a #GOptionGroup for the commandline arguments
+ */
+GOptionGroup *
+gcm_debug_get_option_group (void)
+{
+	GOptionGroup *group;
+	group = g_option_group_new ("debug", _("Debugging Options"), _("Show debugging options"), NULL, NULL);
+	g_option_group_set_parse_hooks (group, gcm_debug_pre_parse_hook, gcm_debug_post_parse_hook);
+	return group;
+}
+
diff --git a/libcolor-glib/gcm-debug.h b/libcolor-glib/gcm-debug.h
new file mode 100644
index 0000000..ac42627
--- /dev/null
+++ b/libcolor-glib/gcm-debug.h
@@ -0,0 +1,37 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2010 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#if !defined (LIBCOLOR_GLIB_COMPILATION)
+#error "Can only include this internally!"
+#endif
+
+#ifndef __GCM_DEBUG_H__
+#define __GCM_DEBUG_H__
+
+#include <glib.h>
+
+#include "config.h"
+
+gboolean	 gcm_debug_is_verbose		(void);
+GOptionGroup	*gcm_debug_get_option_group	(void);
+void		 gcm_debug_setup		(gboolean	 enabled);
+
+#endif /* __GCM_DEBUG_H__ */
diff --git a/libcolor-glib/gcm-dmi.c b/libcolor-glib/gcm-dmi.c
index 1d65e4f..fd2e368 100644
--- a/libcolor-glib/gcm-dmi.c
+++ b/libcolor-glib/gcm-dmi.c
@@ -37,8 +37,6 @@
 #include "gcm-dmi.h"
 #include "gcm-tables.h"
 
-#include "egg-debug.h"
-
 static void     gcm_dmi_finalize	(GObject     *object);
 
 #define GCM_DMI_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_DMI, GcmDmiPrivate))
@@ -80,7 +78,7 @@ gcm_dmi_get_data (const gchar *filename)
 	/* get the contents */
 	ret = g_file_get_contents (filename, &data, NULL, &error);
 	if (!ret) {
-		egg_warning ("failed to get contents of %s: %s", filename, error->message);
+		g_warning ("failed to get contents of %s: %s", filename, error->message);
 		g_error_free (error);
 	}
 
@@ -100,7 +98,6 @@ gcm_dmi_get_data (const gchar *filename)
 	return data;
 }
 
-
 /**
  * gcm_dmi_get_name:
  *
diff --git a/libcolor-glib/gcm-edid.c b/libcolor-glib/gcm-edid.c
index 93bc352..e50f1ef 100644
--- a/libcolor-glib/gcm-edid.c
+++ b/libcolor-glib/gcm-edid.c
@@ -38,8 +38,6 @@
 #include "gcm-edid.h"
 #include "gcm-tables.h"
 
-#include "egg-debug.h"
-
 static void     gcm_edid_finalize	(GObject     *object);
 
 #define GCM_EDID_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_EDID, GcmEdidPrivate))
@@ -101,7 +99,6 @@ G_DEFINE_TYPE (GcmEdid, gcm_edid, G_TYPE_OBJECT)
 #define GCM_DESCRIPTOR_ALPHANUMERIC_DATA_STRING		0xfe
 #define GCM_DESCRIPTOR_COLOR_POINT			0xfb
 
-
 /**
  * gcm_edid_get_monitor_name:
  * @edid: a valid #GcmEdid instance
@@ -496,7 +493,7 @@ gcm_edid_parse (GcmEdid *edid, const guint8 *data, gsize length, GError **error)
 	priv->pnp_id[0] = 'A' + ((data[GCM_EDID_OFFSET_PNPID+0] & 0x7c) / 4) - 1;
 	priv->pnp_id[1] = 'A' + ((data[GCM_EDID_OFFSET_PNPID+0] & 0x3) * 8) + ((data[GCM_EDID_OFFSET_PNPID+1] & 0xe0) / 32) - 1;
 	priv->pnp_id[2] = 'A' + (data[GCM_EDID_OFFSET_PNPID+1] & 0x1f) - 1;
-	egg_debug ("PNPID: %s", priv->pnp_id);
+	g_debug ("PNPID: %s", priv->pnp_id);
 
 	/* maybe there isn't a ASCII serial number descriptor, so use this instead */
 	serial = (guint32) data[GCM_EDID_OFFSET_SERIAL+0];
@@ -505,7 +502,7 @@ gcm_edid_parse (GcmEdid *edid, const guint8 *data, gsize length, GError **error)
 	serial += (guint32) data[GCM_EDID_OFFSET_SERIAL+3] * 0x1000000;
 	if (serial > 0) {
 		priv->serial_number = g_strdup_printf ("%" G_GUINT32_FORMAT, serial);
-		egg_debug ("Serial: %s", priv->serial_number);
+		g_debug ("Serial: %s", priv->serial_number);
 	}
 
 	/* get the size */
@@ -521,31 +518,31 @@ gcm_edid_parse (GcmEdid *edid, const guint8 *data, gsize length, GError **error)
 	/* get gamma */
 	if (data[GCM_EDID_OFFSET_GAMMA] == 0xff) {
 		priv->gamma = 1.0f;
-		egg_debug ("gamma is stored in an extension block");
+		g_debug ("gamma is stored in an extension block");
 	} else {
 		priv->gamma = ((gfloat) data[GCM_EDID_OFFSET_GAMMA] / 100) + 1;
-		egg_debug ("gamma is reported as %f", priv->gamma);
+		g_debug ("gamma is reported as %f", priv->gamma);
 	}
 
 	/* get color red */
 	priv->red->x = gcm_edid_decode_fraction (data[0x1b], gcm_edid_get_bits (data[0x19], 6, 7));
 	priv->red->y = gcm_edid_decode_fraction (data[0x1c], gcm_edid_get_bits (data[0x19], 5, 4));
-	egg_debug ("red x=%f,y=%f", priv->red->x, priv->red->y);
+	g_debug ("red x=%f,y=%f", priv->red->x, priv->red->y);
 
 	/* get color green */
 	priv->green->x = gcm_edid_decode_fraction (data[0x1d], gcm_edid_get_bits (data[0x19], 2, 3));
 	priv->green->y = gcm_edid_decode_fraction (data[0x1e], gcm_edid_get_bits (data[0x19], 0, 1));
-	egg_debug ("green x=%f,y=%f", priv->green->x, priv->green->y);
+	g_debug ("green x=%f,y=%f", priv->green->x, priv->green->y);
 
 	/* get color blue */
 	priv->blue->x = gcm_edid_decode_fraction (data[0x1f], gcm_edid_get_bits (data[0x1a], 6, 7));
 	priv->blue->y = gcm_edid_decode_fraction (data[0x20], gcm_edid_get_bits (data[0x1a], 4, 5));
-	egg_debug ("blue x=%f,y=%f", priv->blue->x, priv->blue->y);
+	g_debug ("blue x=%f,y=%f", priv->blue->x, priv->blue->y);
 
 	/* get color white */
 	priv->white->x = gcm_edid_decode_fraction (data[0x21], gcm_edid_get_bits (data[0x1a], 2, 3));
 	priv->white->y = gcm_edid_decode_fraction (data[0x22], gcm_edid_get_bits (data[0x1a], 0, 1));
-	egg_debug ("white x=%f,y=%f", priv->white->x, priv->white->y);
+	g_debug ("white x=%f,y=%f", priv->white->x, priv->white->y);
 
 	/* parse EDID data */
 	for (i=GCM_EDID_OFFSET_DATA_BLOCKS; i <= GCM_EDID_OFFSET_LAST_BLOCK; i+=18) {
@@ -569,7 +566,7 @@ gcm_edid_parse (GcmEdid *edid, const guint8 *data, gsize length, GError **error)
 				priv->serial_number = tmp;
 			}
 		} else if (data[i+3] == GCM_DESCRIPTOR_COLOR_MANAGEMENT_DATA) {
-			egg_warning ("failing to parse color management data");
+			g_warning ("failing to parse color management data");
 		} else if (data[i+3] == GCM_DESCRIPTOR_ALPHANUMERIC_DATA_STRING) {
 			tmp = gcm_edid_parse_string (&data[i+5]);
 			if (tmp != NULL) {
@@ -578,14 +575,14 @@ gcm_edid_parse (GcmEdid *edid, const guint8 *data, gsize length, GError **error)
 			}
 		} else if (data[i+3] == GCM_DESCRIPTOR_COLOR_POINT) {
 			if (data[i+3+9] != 0xff) {
-				egg_debug ("extended EDID block(1) which contains a better gamma value");
+				g_debug ("extended EDID block(1) which contains a better gamma value");
 				priv->gamma = ((gfloat) data[i+3+9] / 100) + 1;
-				egg_debug ("gamma is overridden as %f", priv->gamma);
+				g_debug ("gamma is overridden as %f", priv->gamma);
 			}
 			if (data[i+3+14] != 0xff) {
-				egg_debug ("extended EDID block(2) which contains a better gamma value");
+				g_debug ("extended EDID block(2) which contains a better gamma value");
 				priv->gamma = ((gfloat) data[i+3+9] / 100) + 1;
-				egg_debug ("gamma is overridden as %f", priv->gamma);
+				g_debug ("gamma is overridden as %f", priv->gamma);
 			}
 		}
 	}
@@ -593,16 +590,16 @@ gcm_edid_parse (GcmEdid *edid, const guint8 *data, gsize length, GError **error)
 	/* extension blocks */
 	extension_blocks = data[GCM_EDID_OFFSET_EXTENSION_BLOCK_COUNT];
 	if (extension_blocks > 0)
-		egg_warning ("%i extension blocks to parse", extension_blocks);
+		g_warning ("%i extension blocks to parse", extension_blocks);
 
 	/* calculate checksum */
 	priv->checksum = g_compute_checksum_for_data (G_CHECKSUM_MD5, data, 0x6c);
 
 	/* print what we've got */
-	egg_debug ("monitor name: %s", priv->monitor_name);
-	egg_debug ("serial number: %s", priv->serial_number);
-	egg_debug ("ascii string: %s", priv->eisa_id);
-	egg_debug ("checksum: %s", priv->checksum);
+	g_debug ("monitor name: %s", priv->monitor_name);
+	g_debug ("serial number: %s", priv->serial_number);
+	g_debug ("ascii string: %s", priv->eisa_id);
+	g_debug ("checksum: %s", priv->checksum);
 out:
 	return ret;
 }
diff --git a/libcolor-glib/gcm-image.c b/libcolor-glib/gcm-image.c
index d7985fd..52ccaf6 100644
--- a/libcolor-glib/gcm-image.c
+++ b/libcolor-glib/gcm-image.c
@@ -31,8 +31,6 @@
 #include <gtk/gtk.h>
 #include <lcms2.h>
 
-#include "egg-debug.h"
-
 #include "gcm-image.h"
 
 static void     gcm_image_finalize	(GObject     *object);
@@ -132,20 +130,20 @@ gcm_image_cms_convert_pixbuf (GcmImage *image)
 
 	/* not a pixbuf-backed image */
 	if (priv->original_pixbuf == NULL) {
-		egg_warning ("no pixbuf to convert");
+		g_warning ("no pixbuf to convert");
 		goto out;
 	}
 
 	/* CMYK not supported */
 	if (gdk_pixbuf_get_colorspace (priv->original_pixbuf) != GDK_COLORSPACE_RGB) {
-		egg_debug ("non-RGB not supported");
+		g_debug ("non-RGB not supported");
 		goto out;
 	}
 
 	/* work out the LCMS format flags */
 	format = gcm_image_get_format (image);
 	if (format == 0) {
-		egg_warning ("format not supported");
+		g_warning ("format not supported");
 		goto out;
 	}
 
@@ -162,7 +160,7 @@ gcm_image_cms_convert_pixbuf (GcmImage *image)
 		/* decode built-in */
 		profile_data = g_base64_decode (profile_base64, &profile_size);
 		if (profile_data == NULL) {
-			egg_warning ("failed to decode base64");
+			g_warning ("failed to decode base64");
 			goto out;
 		}
 
@@ -173,16 +171,16 @@ gcm_image_cms_convert_pixbuf (GcmImage *image)
 
 		/* not RGB */
 		if (gcm_profile_get_colorspace (priv->input_profile) != GCM_COLORSPACE_RGB) {
-			egg_warning ("input colorspace has to be RGB!");
+			g_warning ("input colorspace has to be RGB!");
 			goto out;
 		}
 
 		/* use built-in */
-		egg_debug ("using input profile of %s", gcm_profile_get_filename (priv->input_profile));
+		g_debug ("using input profile of %s", gcm_profile_get_filename (priv->input_profile));
 		profile_in = gcm_profile_get_handle (priv->input_profile);
 		profile_close_input = FALSE;
 	} else {
-		egg_debug ("no input profile, assume sRGB");
+		g_debug ("no input profile, assume sRGB");
 		profile_in = cmsCreate_sRGBProfile ();
 		profile_close_input = TRUE;
 	}
@@ -192,16 +190,16 @@ gcm_image_cms_convert_pixbuf (GcmImage *image)
 
 		/* not RGB */
 		if (gcm_profile_get_colorspace (priv->output_profile) != GCM_COLORSPACE_RGB) {
-			egg_warning ("output colorspace has to be RGB!");
+			g_warning ("output colorspace has to be RGB!");
 			goto out;
 		}
 
 		/* use built-in */
-		egg_debug ("using output profile of %s", gcm_profile_get_filename (priv->output_profile));
+		g_debug ("using output profile of %s", gcm_profile_get_filename (priv->output_profile));
 		profile_out = gcm_profile_get_handle (priv->output_profile);
 		profile_close_output = FALSE;
 	} else {
-		egg_debug ("no output profile, assume sRGB");
+		g_debug ("no output profile, assume sRGB");
 		profile_out = cmsCreate_sRGBProfile ();
 		profile_close_output = TRUE;
 	}
@@ -212,7 +210,7 @@ gcm_image_cms_convert_pixbuf (GcmImage *image)
 
 		/* not LAB */
 		if (gcm_profile_get_colorspace (priv->abstract_profile) != GCM_COLORSPACE_LAB) {
-			egg_warning ("abstract profile has to be LAB!");
+			g_warning ("abstract profile has to be LAB!");
 			goto out;
 		}
 
@@ -279,7 +277,7 @@ gcm_image_notify_pixbuf_cb (GObject *object, GParamSpec *pspec, GcmImage *image)
 		goto out;
 	applied = g_object_get_data (G_OBJECT(pixbuf), "cms-converted-pixbuf");
 	if (applied != NULL) {
-		egg_debug ("already copied and converted pixbuf, use gcm_image_cms_convert_pixbuf() instead");
+		g_debug ("already copied and converted pixbuf, use gcm_image_cms_convert_pixbuf() instead");
 		goto out;
 	}
 
diff --git a/libcolor-glib/gcm-profile-store.c b/libcolor-glib/gcm-profile-store.c
index 42984b0..dbdc76f 100644
--- a/libcolor-glib/gcm-profile-store.c
+++ b/libcolor-glib/gcm-profile-store.c
@@ -34,8 +34,6 @@
 
 #include "gcm-profile-store.h"
 
-#include "egg-debug.h"
-
 static void     gcm_profile_store_finalize	(GObject     *object);
 
 #define GCM_PROFILE_STORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_PROFILE_STORE, GcmProfileStorePrivate))
@@ -185,12 +183,12 @@ gcm_profile_store_remove_profile (GcmProfileStore *profile_store, GcmProfile *pr
 	/* remove from list */
 	ret = g_ptr_array_remove (priv->profile_array, profile);
 	if (!ret) {
-		egg_warning ("failed to remove %s", gcm_profile_get_filename (profile));
+		g_warning ("failed to remove %s", gcm_profile_get_filename (profile));
 		goto out;
 	}
 
 	/* emit a signal */
-	egg_debug ("emit removed (and changed): %s", gcm_profile_get_checksum (profile));
+	g_debug ("emit removed (and changed): %s", gcm_profile_get_checksum (profile));
 	g_signal_emit (profile_store, signals[SIGNAL_REMOVED], 0, profile);
 	g_signal_emit (profile_store, signals[SIGNAL_CHANGED], 0);
 out:
@@ -231,7 +229,7 @@ gcm_profile_store_add_profile (GcmProfileStore *profile_store, GFile *file)
 	profile = gcm_profile_new ();
 	ret = gcm_profile_parse (profile, file, &error);
 	if (!ret) {
-		egg_warning ("failed to add profile '%s': %s", filename, error->message);
+		g_warning ("failed to add profile '%s': %s", filename, error->message);
 		g_error_free (error);
 		goto out;		
 	}
@@ -243,7 +241,7 @@ gcm_profile_store_add_profile (GcmProfileStore *profile_store, GFile *file)
 
 		/* we value a local file higher than the shared file */
 		if (gcm_profile_get_can_delete (profile_tmp)) {
-			egg_debug ("already added a deletable profile %s, cannot add %s",
+			g_debug ("already added a deletable profile %s, cannot add %s",
 				   gcm_profile_get_filename (profile_tmp), filename);
 			goto out;
 		}
@@ -253,12 +251,12 @@ gcm_profile_store_add_profile (GcmProfileStore *profile_store, GFile *file)
 	}
 
 	/* add to array */
-	egg_debug ("parsed new profile '%s'", filename);
+	g_debug ("parsed new profile '%s'", filename);
 	g_ptr_array_add (priv->profile_array, g_object_ref (profile));
 	g_signal_connect (profile, "notify::file", G_CALLBACK(gcm_profile_store_notify_filename_cb), profile_store);
 
 	/* emit a signal */
-	egg_debug ("emit added (and changed): %s", filename);
+	g_debug ("emit added (and changed): %s", filename);
 	g_signal_emit (profile_store, signals[SIGNAL_ADDED], 0, profile);
 	g_signal_emit (profile_store, signals[SIGNAL_CHANGED], 0);
 out:
@@ -288,14 +286,14 @@ gcm_profile_store_file_monitor_changed_cb (GFileMonitor *monitor, GFile *file, G
 	/* ignore temp files */
 	path = g_file_get_path (file);
 	if (g_strrstr (path, ".goutputstream") != NULL) {
-		egg_debug ("ignoring gvfs temporary file");
+		g_debug ("ignoring gvfs temporary file");
 		goto out;
 	}
 
 	/* just rescan the correct directory */
 	parent = g_file_get_parent (file);
 	parent_path = g_file_get_path (parent);
-	egg_debug ("%s was added, rescanning %s", path, parent_path);
+	g_debug ("%s was added, rescanning %s", path, parent_path);
 	gcm_profile_store_search_path (profile_store, parent_path);
 out:
 	if (parent != NULL)
@@ -340,7 +338,7 @@ gcm_profile_store_search_path (GcmProfileStore *profile_store, const gchar *path
 	/* get contents */
 	dir = g_dir_open (path, 0, &error);
 	if (dir == NULL) {
-		egg_debug ("failed to open: %s", error->message);
+		g_debug ("failed to open: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -351,7 +349,7 @@ gcm_profile_store_search_path (GcmProfileStore *profile_store, const gchar *path
 		file = g_file_new_for_path (path);
 		monitor = g_file_monitor_directory (file, G_FILE_MONITOR_NONE, NULL, &error);
 		if (monitor == NULL) {
-			egg_debug ("failed to monitor path: %s", error->message);
+			g_debug ("failed to monitor path: %s", error->message);
 			g_error_free (error);
 			goto out;
 		}
@@ -410,12 +408,12 @@ gcm_profile_store_add_profiles_from_mounted_volume (GcmProfileStore *profile_sto
 	/* get the filesystem type */
 	info = g_file_query_filesystem_info (root, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE, NULL, &error);
 	if (info == NULL) {
-		egg_warning ("failed to get filesystem type: %s", error->message);
+		g_warning ("failed to get filesystem type: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
 	type = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE);
-	egg_debug ("filesystem mounted on %s has type %s", path_root, type);
+	g_debug ("filesystem mounted on %s has type %s", path_root, type);
 
 	/* only scan hfs volumes for OSX */
 	if (g_strcmp0 (type, "hfs") == 0) {
@@ -557,7 +555,7 @@ gcm_profile_store_search (GcmProfileStore *profile_store, GcmProfileSearchFlags
 		path = g_build_filename (g_get_user_data_dir (), "icc", NULL);
 		ret = gcm_profile_store_mkdir_with_parents (path, &error);
 		if (!ret) {
-			egg_warning ("failed to create directory on startup: %s", error->message);
+			g_warning ("failed to create directory on startup: %s", error->message);
 			g_error_free (error);
 		} else {
 			ret = gcm_profile_store_search_path (profile_store, path);
diff --git a/libcolor-glib/gcm-profile.c b/libcolor-glib/gcm-profile.c
index 0fbd8a9..d949355 100644
--- a/libcolor-glib/gcm-profile.c
+++ b/libcolor-glib/gcm-profile.c
@@ -34,8 +34,6 @@
 #include <gio/gio.h>
 #include <lcms2.h>
 
-#include "egg-debug.h"
-
 #include "gcm-profile.h"
 #include "gcm-color.h"
 
@@ -119,7 +117,6 @@ gcm_profile_get_description (GcmProfile *profile)
 	return profile->priv->description;
 }
 
-
 /**
  * gcm_profile_ensure_printable:
  **/
@@ -679,22 +676,22 @@ gcm_profile_parse_data (GcmProfile *profile, const guint8 *data, gsize length, G
 
 		/* convert to lcms xyY values */
 		cmsXYZ2xyY (&xyY, cie_xyz);
-		egg_debug ("whitepoint = %f,%f [%f]", xyY.x, xyY.y, xyY.Y);
+		g_debug ("whitepoint = %f,%f [%f]", xyY.x, xyY.y, xyY.Y);
 
 		/* get temperature */
 		ret = cmsTempFromWhitePoint (&temp_float, &xyY);
 		if (ret) {
 			/* round to nearest 100K */
 			priv->temperature = (((guint) temp_float) / 100) * 100;
-			egg_debug ("color temperature = %i", priv->temperature);
+			g_debug ("color temperature = %i", priv->temperature);
 		} else {
 			priv->temperature = 0;
-			egg_warning ("failed to get color temperature");
+			g_warning ("failed to get color temperature");
 		}
 	} else {
 		/* this is no big suprise, some profiles don't have these */
 		gcm_color_clear_XYZ (priv->white);
-		egg_debug ("failed to get white point");
+		g_debug ("failed to get white point");
 	}
 
 	/* get black point */
@@ -786,7 +783,7 @@ gcm_profile_parse_data (GcmProfile *profile, const guint8 *data, gsize length, G
 			gcm_color_copy_XYZ ((GcmColorXYZ *) cie_xyz, (GcmColorXYZ *) &cie_illum.Blue);
 			got_illuminants = TRUE;
 		} else {
-			egg_debug ("failed to get illuminants");
+			g_debug ("failed to get illuminants");
 		}
 	}
 
@@ -821,7 +818,7 @@ gcm_profile_parse_data (GcmProfile *profile, const guint8 *data, gsize length, G
 			cmsDeleteTransform (transform);
 			got_illuminants = TRUE;
 		} else {
-			egg_debug ("failed to run through profile");
+			g_debug ("failed to run through profile");
 		}
 
 		/* no more need for the output profile */
@@ -837,7 +834,7 @@ gcm_profile_parse_data (GcmProfile *profile, const guint8 *data, gsize length, G
 		gcm_color_set_XYZ (priv->blue,
 				   cie_illum.Blue.X, cie_illum.Blue.Y, cie_illum.Blue.Z);
 	} else {
-		egg_debug ("failed to get luminance values");
+		g_debug ("failed to get luminance values");
 		gcm_color_clear_XYZ (priv->red);
 		gcm_color_clear_XYZ (priv->green);
 		gcm_color_clear_XYZ (priv->blue);
@@ -1122,7 +1119,7 @@ gcm_profile_save (GcmProfile *profile, const gchar *filename, GError **error)
 
 	/* the profile now tracks the saved file */
 	if (priv->filename == NULL) {
-		egg_debug ("assuming %s, so re-parse", filename);
+		g_debug ("assuming %s, so re-parse", filename);
 		file = g_file_new_for_path (filename);
 		ret = gcm_profile_parse (profile, file, error);
 		if (!ret)
@@ -1306,7 +1303,7 @@ gcm_profile_generate_vcgt (GcmProfile *profile, guint size)
 	/* get tone curves from profile */
 	vcgt = cmsReadTag (priv->lcms_profile, cmsSigVcgtType);
 	if (vcgt == NULL || vcgt[0] == NULL) {
-		egg_debug ("profile does not have any VCGT data");
+		g_debug ("profile does not have any VCGT data");
 		goto out;
 	}
 
@@ -1501,7 +1498,7 @@ gcm_profile_file_monitor_changed_cb (GFileMonitor *monitor, GFile *file, GFile *
 		goto out;
 
 	/* just rescan everything */
-	egg_debug ("%s deleted, clearing filename", priv->filename);
+	g_debug ("%s deleted, clearing filename", priv->filename);
 	if (priv->file != NULL)
 		g_object_unref (priv->file);
 	priv->file = NULL;
@@ -1512,14 +1509,13 @@ out:
 	return;
 }
 
-
 /**
  * gcm_profile_error_cb:
  **/
 static void
 gcm_profile_error_cb (cmsContext ContextID, cmsUInt32Number errorcode, const char *text)
 {
-	egg_warning ("LCMS error %i: %s", errorcode, text);
+	g_warning ("LCMS error %i: %s", errorcode, text);
 }
 
 /**
diff --git a/libcolor-glib/gcm-sample-window.c b/libcolor-glib/gcm-sample-window.c
index 68b517c..c291c03 100644
--- a/libcolor-glib/gcm-sample-window.c
+++ b/libcolor-glib/gcm-sample-window.c
@@ -32,8 +32,6 @@
 #include <glib-object.h>
 #include "gcm-sample-window.h"
 
-#include "egg-debug.h"
-
 static void     gcm_sample_window_finalize	(GObject     *object);
 
 #define GCM_SAMPLE_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_SAMPLE_WINDOW, GcmSampleWindowPrivate))
@@ -124,7 +122,7 @@ gcm_sample_window_set_color (GcmSampleWindow *sample_window, const GcmColorRGB *
 	gtk_window_get_size (window, &width, &height);
 
 	/* if no pixbuf, create it */
-	egg_debug ("setting RGB: %f, %f, %f", color->R, color->G, color->B);
+	g_debug ("setting RGB: %f, %f, %f", color->R, color->G, color->B);
 	pixbuf = gtk_image_get_pixbuf (GTK_IMAGE (sample_window->priv->image));
 	if (pixbuf == NULL) {
 		data = g_new0 (guchar, width*height*3);
diff --git a/libcolor-glib/gcm-self-test.c b/libcolor-glib/gcm-self-test.c
index d84c7d2..5f8044a 100644
--- a/libcolor-glib/gcm-self-test.c
+++ b/libcolor-glib/gcm-self-test.c
@@ -218,7 +218,6 @@ gcm_test_sensor_func (void)
 	g_object_unref (sensor);
 }
 
-
 typedef struct {
 	const gchar *monitor_name;
 	const gchar *vendor_name;
@@ -299,7 +298,6 @@ gcm_test_edid_func (void)
 	g_object_unref (edid);
 }
 
-
 static void
 gcm_test_tables_func (void)
 {
@@ -330,7 +328,6 @@ gcm_test_tables_func (void)
 	g_object_unref (tables);
 }
 
-
 static void
 gcm_test_profile_func (void)
 {
@@ -453,7 +450,6 @@ gcm_test_profile_func (void)
 	g_object_unref (profile);
 }
 
-
 static void
 gcm_test_clut_func (void)
 {
@@ -578,7 +574,6 @@ gcm_test_xyz_func (void)
 	gcm_color_free_XYZ (xyz);
 }
 
-
 static void
 gcm_test_profile_store_func (void)
 {
diff --git a/libcolor-glib/gcm-sensor-client.c b/libcolor-glib/gcm-sensor-client.c
index ad49420..af043a9 100644
--- a/libcolor-glib/gcm-sensor-client.c
+++ b/libcolor-glib/gcm-sensor-client.c
@@ -35,8 +35,6 @@
 #include "gcm-sensor-client.h"
 #include "gcm-sensor-huey.h"
 
-#include "egg-debug.h"
-
 static void     gcm_sensor_client_finalize	(GObject     *object);
 
 #define GCM_SENSOR_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_SENSOR_CLIENT, GcmSensorClientPrivate))
@@ -179,14 +177,14 @@ gcm_sensor_client_device_add (GcmSensorClient *sensor_client, GUdevDevice *devic
 	kind_str = g_udev_device_get_property (device, "GCM_KIND");
 	kind = gcm_sensor_kind_from_string (kind_str);
 	if (kind == GCM_SENSOR_KIND_HUEY) {
-		egg_warning ("creating internal device");
+		g_warning ("creating internal device");
 		sensor = gcm_sensor_huey_new ();
 	} else {
 		sensor = gcm_sensor_new ();
 	}
 
 	/* get data */
-	egg_debug ("adding color management device: %s", g_udev_device_get_sysfs_path (device));
+	g_debug ("adding color management device: %s", g_udev_device_get_sysfs_path (device));
 	ret = gcm_sensor_set_from_device (sensor, device, NULL);
 	if (!ret)
 		goto out;
@@ -196,7 +194,7 @@ gcm_sensor_client_device_add (GcmSensorClient *sensor_client, GUdevDevice *devic
 	priv->sensor = g_object_ref (sensor);
 
 	/* signal the addition */
-	egg_debug ("emit: changed");
+	g_debug ("emit: changed");
 	g_signal_emit (sensor_client, signals[SIGNAL_CHANGED], 0);
 out:
 	if (sensor != NULL)
@@ -219,14 +217,14 @@ gcm_sensor_client_device_remove (GcmSensorClient *sensor_client, GUdevDevice *de
 		goto out;
 
 	/* get data */
-	egg_debug ("removing color management device: %s", g_udev_device_get_sysfs_path (device));
+	g_debug ("removing color management device: %s", g_udev_device_get_sysfs_path (device));
 	priv->present = FALSE;
 	if (priv->sensor != NULL)
 		g_object_unref (priv->sensor);
 	priv->sensor = NULL;
 
 	/* signal the removal */
-	egg_debug ("emit: changed");
+	g_debug ("emit: changed");
 	g_signal_emit (sensor_client, signals[SIGNAL_CHANGED], 0);
 out:
 	return ret;
@@ -248,7 +246,7 @@ gcm_sensor_client_coldplug (GcmSensorClient *sensor_client)
 	for (l = devices; l != NULL; l = l->next) {
 		ret = gcm_sensor_client_device_add (sensor_client, l->data);
 		if (ret) {
-			egg_debug ("found color management device");
+			g_debug ("found color management device");
 			break;
 		}
 	}
@@ -264,7 +262,7 @@ gcm_sensor_client_coldplug (GcmSensorClient *sensor_client)
 static void
 gcm_sensor_client_uevent_cb (GUdevClient *client, const gchar *action, GUdevDevice *device, GcmSensorClient *sensor_client)
 {
-	egg_debug ("uevent %s", action);
+	g_debug ("uevent %s", action);
 	if (g_strcmp0 (action, "add") == 0) {
 		gcm_sensor_client_device_add (sensor_client, device);
 	} else if (g_strcmp0 (action, "remove") == 0) {
diff --git a/libcolor-glib/gcm-sensor-colormunki.c b/libcolor-glib/gcm-sensor-colormunki.c
index 438e1e2..97d9ff8 100644
--- a/libcolor-glib/gcm-sensor-colormunki.c
+++ b/libcolor-glib/gcm-sensor-colormunki.c
@@ -32,8 +32,6 @@
 #include <libusb-1.0/libusb.h>
 #include <libcolor-glib.h>
 
-#include "egg-debug.h"
-
 #include "gcm-sensor-colormunki.h"
 #include "gcm-sensor-colormunki-private.h"
 
@@ -73,9 +71,6 @@ gcm_sensor_colormunki_print_data (const gchar *title, const guchar *data, gsize
 {
 	guint i;
 
-	if (!egg_debug_is_verbose ())
-		return;
-
 	if (g_strcmp0 (title, "request") == 0)
 		g_print ("%c[%dm", 0x1B, 31);
 	if (g_strcmp0 (title, "reply") == 0)
@@ -91,7 +86,6 @@ gcm_sensor_colormunki_print_data (const gchar *title, const guchar *data, gsize
 static void
 gcm_sensor_colormunki_submit_transfer (GcmSensorColormunki *sensor_colormunki);
 
-
 /**
  * gcm_sensor_colormunki_refresh_state_transfer_cb:
  **/
@@ -103,13 +97,13 @@ gcm_sensor_colormunki_refresh_state_transfer_cb (struct libusb_transfer *transfe
 	guint8 *reply = transfer->buffer + LIBUSB_CONTROL_SETUP_SIZE;
 
 	if (transfer->status != LIBUSB_TRANSFER_COMPLETED) {
-		egg_warning ("did not succeed");
+		g_warning ("did not succeed");
 		goto out;
 	}
 
 	/* sensor position and button state */
 	priv->dial_position = reply[0];
-	egg_debug ("dial now %s, button now %s",
+	g_debug ("dial now %s, button now %s",
 		   gcm_sensor_colormunki_dial_position_to_string (priv->dial_position),
 		   gcm_sensor_colormunki_button_state_to_string (reply[1]));
 
@@ -146,7 +140,7 @@ gcm_sensor_colormunki_refresh_state (GcmSensorColormunki *sensor_colormunki, GEr
 	/* submit transfer */
 	retval = libusb_submit_transfer (priv->transfer_state);
 	if (retval < 0) {
-		egg_warning ("failed to submit transfer: %s", libusb_strerror (retval));
+		g_warning ("failed to submit transfer: %s", libusb_strerror (retval));
 		goto out;
 	}
 
@@ -167,7 +161,7 @@ gcm_sensor_colormunki_transfer_cb (struct libusb_transfer *transfer)
 	guint8 *reply = transfer->buffer;
 
 	if (transfer->status != LIBUSB_TRANSFER_COMPLETED) {
-		egg_warning ("did not succeed");
+		g_warning ("did not succeed");
 		return;
 	}
 
@@ -175,14 +169,14 @@ gcm_sensor_colormunki_transfer_cb (struct libusb_transfer *transfer)
 	timestamp = (reply[7] << 24) + (reply[6] << 16) + (reply[5] << 8) + (reply[4] << 0);
 	/* we only care when the button is pressed */
 	if (reply[0] == GCM_SENSOR_COLORMUNKI_COMMAND_BUTTON_RELEASED) {
-		egg_debug ("ignoring button released");
+		g_debug ("ignoring button released");
 		goto out;
 	}
 
 	if (reply[0] == GCM_SENSOR_COLORMUNKI_COMMAND_DIAL_ROTATE) {
-		egg_warning ("dial rotate at %ims", timestamp);
+		g_warning ("dial rotate at %ims", timestamp);
 	} else if (reply[0] == GCM_SENSOR_COLORMUNKI_COMMAND_BUTTON_PRESSED) {
-		egg_debug ("button pressed at %ims", timestamp);
+		g_debug ("button pressed at %ims", timestamp);
 		gcm_sensor_button_pressed (GCM_SENSOR (sensor_colormunki));
 	}
 
@@ -214,10 +208,10 @@ gcm_sensor_colormunki_submit_transfer (GcmSensorColormunki *sensor_colormunki)
 					gcm_sensor_colormunki_transfer_cb,
 					sensor_colormunki, -1);
 
-	egg_debug ("submitting transfer");
+	g_debug ("submitting transfer");
 	retval = libusb_submit_transfer (priv->transfer_interrupt);
 	if (retval < 0)
-		egg_warning ("failed to submit transfer: %s", libusb_strerror (retval));
+		g_warning ("failed to submit transfer: %s", libusb_strerror (retval));
 }
 
 /**
@@ -236,7 +230,7 @@ gcm_sensor_colormunki_get_eeprom_data (GcmSensorColormunki *sensor_colormunki,
 	GcmSensorColormunkiPrivate *priv = sensor_colormunki->priv;
 
 	/* do EEPROM request */
-	egg_debug ("get EEPROM at 0x%04x for %i", address, size);
+	g_debug ("get EEPROM at 0x%04x for %i", address, size);
 	gcm_buffer_write_uint32_le (request, address);
 	gcm_buffer_write_uint32_le (request + 4, size);
 	gcm_sensor_colormunki_print_data ("request", request, 8);
@@ -295,9 +289,7 @@ gcm_sensor_colormunki_playdo (GcmSensor *sensor, GError **error)
 	GcmSensorColormunki *sensor_colormunki = GCM_SENSOR_COLORMUNKI (sensor);
 //	GcmSensorColormunkiPrivate *priv = sensor_colormunki->priv;
 
-
-
-	egg_debug ("submit transfer");
+	g_debug ("submit transfer");
 	gcm_sensor_colormunki_submit_transfer (sensor_colormunki);
 	ret = gcm_sensor_colormunki_refresh_state (sensor_colormunki, error);
 //out:
@@ -388,10 +380,10 @@ gcm_sensor_colormunki_startup (GcmSensor *sensor, GError **error)
 	gcm_sensor_set_serial_number (sensor, (const gchar*) buffer);
 
 	/* print details */
-	egg_debug ("Chip ID\t%s", priv->chip_id);
-	egg_debug ("Serial number\t%s", gcm_sensor_get_serial_number (sensor));
-	egg_debug ("Version\t%s", priv->version_string);
-	egg_debug ("Firmware\tfirmware_revision=%s, tick_duration=%i, min_int=%i, eeprom_blocks=%i, eeprom_blocksize=%i",
+	g_debug ("Chip ID\t%s", priv->chip_id);
+	g_debug ("Serial number\t%s", gcm_sensor_get_serial_number (sensor));
+	g_debug ("Version\t%s", priv->version_string);
+	g_debug ("Firmware\tfirmware_revision=%s, tick_duration=%i, min_int=%i, eeprom_blocks=%i, eeprom_blocksize=%i",
 		   priv->firmware_revision, priv->tick_duration, priv->min_int, priv->eeprom_blocks, priv->eeprom_blocksize);
 
 	/* do unknown cool stuff */
diff --git a/libcolor-glib/gcm-sensor-dummy.c b/libcolor-glib/gcm-sensor-dummy.c
index 5efaf55..bc94167 100644
--- a/libcolor-glib/gcm-sensor-dummy.c
+++ b/libcolor-glib/gcm-sensor-dummy.c
@@ -129,7 +129,6 @@ out:
 	return ret;
 }
 
-
 /**
  * gcm_sensor_dummy_sample_state_finish:
  **/
diff --git a/libcolor-glib/gcm-sensor-huey.c b/libcolor-glib/gcm-sensor-huey.c
index 96f8f09..42f75cb 100644
--- a/libcolor-glib/gcm-sensor-huey.c
+++ b/libcolor-glib/gcm-sensor-huey.c
@@ -31,8 +31,6 @@
 #include <glib-object.h>
 #include <libusb-1.0/libusb.h>
 
-#include "egg-debug.h"
-
 #include "gcm-buffer.h"
 #include "gcm-usb.h"
 #include "gcm-math.h"
@@ -97,9 +95,6 @@ gcm_sensor_huey_print_data (const gchar *title, const guchar *data, gsize length
 {
 	guint i;
 
-	if (!egg_debug_is_verbose ())
-		return;
-
 	if (g_strcmp0 (title, "request") == 0)
 		g_print ("%c[%dm", 0x1B, 31);
 	if (g_strcmp0 (title, "reply") == 0)
@@ -664,7 +659,7 @@ gcm_sensor_huey_sample_thread_cb (GSimpleAsyncResult *res, GObject *object, GCan
 		g_error_free (error);
 		goto out;
 	}
-	egg_debug ("initial values: red=%0.6lf, green=%0.6lf, blue=%0.6lf", color_native.R, color_native.G, color_native.B);
+	g_debug ("initial values: red=%0.6lf, green=%0.6lf, blue=%0.6lf", color_native.R, color_native.G, color_native.B);
 
 	/* compromise between the amount of time and the precision */
 	precision_value = (gdouble) HUEY_PRECISION_TIME_VALUE;
@@ -679,7 +674,7 @@ gcm_sensor_huey_sample_thread_cb (GSimpleAsyncResult *res, GObject *object, GCan
 		multiplier.G = 1;
 	if (multiplier.B == 0)
 		multiplier.B = 1;
-	egg_debug ("using multiplier factor: red=%i, green=%i, blue=%i", multiplier.R, multiplier.G, multiplier.B);
+	g_debug ("using multiplier factor: red=%i, green=%i, blue=%i", multiplier.R, multiplier.G, multiplier.B);
 	ret = gcm_sensor_huey_sample_for_threshold (sensor_huey, &multiplier, &color_native, &error);
 	if (!ret) {
 		g_simple_async_result_set_from_error (res, error);
@@ -687,14 +682,14 @@ gcm_sensor_huey_sample_thread_cb (GSimpleAsyncResult *res, GObject *object, GCan
 		goto out;
 	}
 
-	egg_debug ("scaled values: red=%0.6lf, green=%0.6lf, blue=%0.6lf", color_native.R, color_native.G, color_native.B);
+	g_debug ("scaled values: red=%0.6lf, green=%0.6lf, blue=%0.6lf", color_native.R, color_native.G, color_native.B);
 
 	/* we use different calibration matrices for each output type */
 	if (output_type == GCM_SENSOR_OUTPUT_TYPE_LCD) {
-		egg_debug ("using LCD calibration matrix");
+		g_debug ("using LCD calibration matrix");
 		device_calibration = &sensor_huey->priv->calibration_lcd;
 	} else {
-		egg_debug ("using CRT calibration matrix");
+		g_debug ("using CRT calibration matrix");
 		device_calibration = &sensor_huey->priv->calibration_crt;
 	}
 
@@ -706,7 +701,7 @@ gcm_sensor_huey_sample_thread_cb (GSimpleAsyncResult *res, GObject *object, GCan
 						   2000.0f,
 						   HUEY_XYZ_POST_MULTIPLY_SCALE_FACTOR);
 
-	egg_debug ("finished values: red=%0.6lf, green=%0.6lf, blue=%0.6lf", color_result.X, color_result.Y, color_result.Z);
+	g_debug ("finished values: red=%0.6lf, green=%0.6lf, blue=%0.6lf", color_result.X, color_result.Y, color_result.Z);
 
 	/* save result */
 	tmp = g_new0 (GcmColorXYZ, 1);
@@ -833,7 +828,7 @@ gcm_sensor_huey_startup (GcmSensor *sensor, GError **error)
 		goto out;
 	serial_number_tmp = g_strdup_printf ("%i", serial_number);
 	gcm_sensor_set_serial_number (sensor, serial_number_tmp);
-	egg_debug ("Serial number: %s", serial_number_tmp);
+	g_debug ("Serial number: %s", serial_number_tmp);
 
 	/* get unlock string */
 	ret = gcm_sensor_huey_read_register_string (sensor_huey,
@@ -841,7 +836,7 @@ gcm_sensor_huey_startup (GcmSensor *sensor, GError **error)
 						    priv->unlock_string, 5, error);
 	if (!ret)
 		goto out;
-	egg_debug ("Unlock string: %s", priv->unlock_string);
+	g_debug ("Unlock string: %s", priv->unlock_string);
 
 	/* get matrix */
 	gcm_mat33_clear (&priv->calibration_lcd);
@@ -850,7 +845,7 @@ gcm_sensor_huey_startup (GcmSensor *sensor, GError **error)
 						    &priv->calibration_lcd, error);
 	if (!ret)
 		goto out;
-	egg_debug ("device matrix1: %s", gcm_mat33_to_string (&priv->calibration_lcd));
+	g_debug ("device matrix1: %s", gcm_mat33_to_string (&priv->calibration_lcd));
 
 	/* get another matrix, although this one is different... */
 	gcm_mat33_clear (&priv->calibration_crt);
@@ -859,7 +854,7 @@ gcm_sensor_huey_startup (GcmSensor *sensor, GError **error)
 						    &priv->calibration_crt, error);
 	if (!ret)
 		goto out;
-	egg_debug ("device matrix2: %s", gcm_mat33_to_string (&priv->calibration_crt));
+	g_debug ("device matrix2: %s", gcm_mat33_to_string (&priv->calibration_crt));
 
 	/* this number is different on all three hueys */
 	ret = gcm_sensor_huey_read_register_float (sensor_huey,
diff --git a/libcolor-glib/gcm-sensor.c b/libcolor-glib/gcm-sensor.c
index 6dcbedd..d9a2587 100644
--- a/libcolor-glib/gcm-sensor.c
+++ b/libcolor-glib/gcm-sensor.c
@@ -31,7 +31,6 @@
 #include <glib-object.h>
 
 #include "gcm-sensor.h"
-#include "egg-debug.h"
 
 static void     gcm_sensor_finalize	(GObject     *object);
 
@@ -61,7 +60,6 @@ struct _GcmSensorPrivate
 	gchar				*image_spotread;
 };
 
-
 /* tiny helper to help us do the async operation */
 typedef struct {
 	GError		**error;
@@ -142,7 +140,7 @@ gcm_sensor_get_image_spotread (GcmSensor *sensor)
 void
 gcm_sensor_button_pressed (GcmSensor *sensor)
 {
-	egg_debug ("emit: button-pressed");
+	g_debug ("emit: button-pressed");
 	g_signal_emit (sensor, signals[SIGNAL_BUTTON_PRESSED], 0);
 }
 
@@ -414,7 +412,7 @@ gcm_sensor_set_from_device (GcmSensor *sensor, GUdevDevice *device, GError **err
 	if (priv->kind == GCM_SENSOR_KIND_UNKNOWN)
 		priv->kind = gcm_sensor_kind_from_string (kind_str);
 	if (priv->kind == GCM_SENSOR_KIND_UNKNOWN)
-		egg_warning ("Failed to recognize color device: %s", priv->model);
+		g_warning ("Failed to recognize color device: %s", priv->model);
 
 	priv->supports_display = g_udev_device_get_property_as_boolean (device, "GCM_TYPE_DISPLAY");
 	priv->supports_projector = g_udev_device_get_property_as_boolean (device, "GCM_TYPE_PROJECTOR");
@@ -979,7 +977,6 @@ gcm_sensor_class_init (GcmSensorClass *klass)
 				      G_PARAM_READABLE);
 	g_object_class_install_property (object_class, PROP_SUPPORTS_PROJECTOR, pspec);
 
-
 	/**
 	 * GcmSensor:supports-printer:
 	 */
diff --git a/libcolor-glib/gcm-tables.c b/libcolor-glib/gcm-tables.c
index 18c84d7..b320bfa 100644
--- a/libcolor-glib/gcm-tables.c
+++ b/libcolor-glib/gcm-tables.c
@@ -32,8 +32,6 @@
 
 #include "gcm-tables.h"
 
-#include "egg-debug.h"
-
 static void     gcm_tables_finalize	(GObject     *object);
 
 #define GCM_TABLES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_TABLES, GcmTablesPrivate))
@@ -93,7 +91,7 @@ gcm_tables_get_pnp_id (GcmTables *tables, const gchar *pnp_id, GError **error)
 		}
 
 		/* load the contents */
-		egg_debug ("loading: %s", filename);
+		g_debug ("loading: %s", filename);
 		ret = g_file_get_contents (filename, &data, NULL, error);
 		if (!ret)
 			goto out;
@@ -216,7 +214,7 @@ gcm_tables_set_default_data_dir (GcmTables *tables)
 	}
 
 	/* need to install package? */
-	egg_warning ("cannot find pnp.ids");
+	g_warning ("cannot find pnp.ids");
 out:
 	return ret;
 }
diff --git a/libcolor-glib/gcm-usb.c b/libcolor-glib/gcm-usb.c
index 011d6ee..43902af 100644
--- a/libcolor-glib/gcm-usb.c
+++ b/libcolor-glib/gcm-usb.c
@@ -35,8 +35,6 @@
 #include "gcm-usb.h"
 #include "gcm-compat.h"
 
-#include "egg-debug.h"
-
 static void     gcm_usb_finalize	(GObject     *object);
 
 #define GCM_USB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_USB, GcmUsbPrivate))
@@ -119,11 +117,11 @@ gcm_libusb_pollfd_remove (GcmUsb *usb, int fd)
 	GPollFD *pollfd;
 	GSList *elem = source->pollfds;
 
-	egg_debug ("remove pollfd %i", fd);
+	g_debug ("remove pollfd %i", fd);
 
 	/* nothing to see here, move along */
 	if (elem == NULL) {
-		egg_warning("cannot remove from list as list is empty?");
+		g_warning("cannot remove from list as list is empty?");
 		return;
 	}
 
@@ -138,7 +136,7 @@ gcm_libusb_pollfd_remove (GcmUsb *usb, int fd)
 		source->pollfds = g_slist_delete_link (source->pollfds, elem);
 		return;
 	} while ((elem = g_slist_next(elem)));
-	egg_warning ("couldn't find fd %d in list", fd);
+	g_warning ("couldn't find fd %d in list", fd);
 }
 
 /**
@@ -153,7 +151,7 @@ gcm_libusb_pollfd_remove_all (GcmUsb *usb)
 
 	/* never connected */
 	if (source == NULL) {
-		egg_debug ("never attached to a context");
+		g_debug ("never attached to a context");
 		return;
 	}
 
@@ -165,7 +163,7 @@ gcm_libusb_pollfd_remove_all (GcmUsb *usb)
 	/* rip apart all the pollfd's */
 	do {
 		pollfd = elem->data;
-		egg_warning ("removing %i", pollfd->fd);
+		g_warning ("removing %i", pollfd->fd);
 		g_source_remove_poll ((GSource *) source, pollfd);
 		g_slice_free (GPollFD, pollfd);
 		source->pollfds = g_slist_delete_link (source->pollfds, elem);
@@ -291,7 +289,7 @@ gcm_usb_attach_to_context (GcmUsb *usb, GMainContext *context)
 
 	/* already connected */
 	if (priv->source != NULL) {
-		egg_warning ("already attached to a context");
+		g_warning ("already attached to a context");
 		return;
 	}
 
diff --git a/libcolor-glib/gcm-x11-output.c b/libcolor-glib/gcm-x11-output.c
index 292c4ad..9cc6b1f 100644
--- a/libcolor-glib/gcm-x11-output.c
+++ b/libcolor-glib/gcm-x11-output.c
@@ -37,8 +37,6 @@
 
 #include "gcm-x11-output.h"
 
-#include "egg-debug.h"
-
 static void     gcm_x11_output_finalize	(GObject     *object);
 
 #define GCM_X11_OUTPUT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_X11_OUTPUT, GcmX11OutputPrivate))
@@ -533,7 +531,6 @@ gcm_x11_output_get_gamma (GcmX11Output *output, guint *length, guint16 **red, gu
 	return TRUE;
 }
 
-
 /**
  * gcm_x11_output_get_profile_data:
  * @output: a valid %GcmX11Output instance
@@ -570,7 +567,7 @@ gcm_x11_output_get_profile_data (GcmX11Output *output, guint8 **data, gsize *len
 				   atom, 0, ~0, False, False,
 				   AnyPropertyType, &type, &format, &nitems, &bytes_after,
 				   (unsigned char **) &data_tmp);
-	egg_debug ("got %i bytes", (guint) nitems);
+	g_debug ("got %i bytes", (guint) nitems);
 	gdk_error_trap_pop_ignored ();
 
 	/* did the call fail */
@@ -623,7 +620,7 @@ gcm_x11_output_set_profile (GcmX11Output *output, const gchar *filename, GError
 	g_return_val_if_fail (GCM_IS_X11_OUTPUT (output), FALSE);
 	g_return_val_if_fail (filename != NULL, FALSE);
 
-	egg_debug ("setting output ICC profile atom from %s", filename);
+	g_debug ("setting output ICC profile atom from %s", filename);
 
 	/* get contents of file */
 	ret = g_file_get_contents (filename, &data, &length, error);
diff --git a/libcolor-glib/gcm-x11-screen.c b/libcolor-glib/gcm-x11-screen.c
index bebf9c4..3244721 100644
--- a/libcolor-glib/gcm-x11-screen.c
+++ b/libcolor-glib/gcm-x11-screen.c
@@ -37,8 +37,6 @@
 
 #include "gcm-x11-screen.h"
 
-#include "egg-debug.h"
-
 static void     gcm_x11_screen_finalize	(GObject     *object);
 
 #define GCM_X11_SCREEN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_X11_SCREEN, GcmX11ScreenPrivate))
@@ -87,7 +85,7 @@ gcm_x11_screen_on_event_cb (GdkXEvent *xevent, GdkEvent *event, gpointer data)
 	event_num = e->type - priv->randr_event_base;
 
 	if (event_num == RRScreenChangeNotify) {
-		egg_debug ("emit changed");
+		g_debug ("emit changed");
 		g_signal_emit (screen, signals[SIGNAL_CHANGED], 0);
 	}
 
@@ -135,7 +133,7 @@ gcm_x11_screen_refresh (GcmX11Screen *screen, GError **error)
 		output_info = XRRGetOutputInfo (priv->xdisplay, resources, rr_output);
 		gdk_flush ();
 		if (gdk_error_trap_pop ()) {
-			egg_warning ("failed to get output info");
+			g_warning ("failed to get output info");
 			continue;
 		}
 
@@ -147,7 +145,7 @@ gcm_x11_screen_refresh (GcmX11Screen *screen, GError **error)
 			crtc_info = XRRGetCrtcInfo (priv->xdisplay, resources, output_info->crtc);
 			gdk_flush ();
 			if (gdk_error_trap_pop () || crtc_info == NULL) {
-				egg_warning ("failed to get crtc info for %s", output_info->name);
+				g_warning ("failed to get crtc info for %s", output_info->name);
 				continue;
 			}
 
@@ -156,7 +154,7 @@ gcm_x11_screen_refresh (GcmX11Screen *screen, GError **error)
 			gamma_size = XRRGetCrtcGammaSize (priv->xdisplay, output_info->crtc);
 			gdk_flush ();
 			if (gdk_error_trap_pop ()) {
-				egg_warning ("failed to get gamma size");
+				g_warning ("failed to get gamma size");
 				continue;
 			}
 
@@ -256,7 +254,7 @@ gcm_x11_screen_assign (GcmX11Screen *screen, GdkScreen *gdk_screen, GError **err
 			priv->xroot,
 			RRScreenChangeNotifyMask);
 	if (gdk_error_trap_pop ()) {
-		egg_warning ("failed to select input");
+		g_warning ("failed to select input");
 		goto out;
 	}
 
@@ -422,7 +420,7 @@ gcm_x11_screen_set_profile (GcmX11Screen *screen, const gchar *filename, GError
 	g_return_val_if_fail (GCM_IS_X11_SCREEN (screen), FALSE);
 	g_return_val_if_fail (filename != NULL, FALSE);
 
-	egg_debug ("setting root window ICC profile atom from %s", filename);
+	g_debug ("setting root window ICC profile atom from %s", filename);
 
 	/* get contents of file */
 	ret = g_file_get_contents (filename, &data, &length, error);
@@ -555,7 +553,7 @@ gcm_x11_screen_remove_protocol_version (GcmX11Screen *screen, GError **error)
 
 	g_return_val_if_fail (GCM_IS_X11_SCREEN (screen), FALSE);
 
-	egg_debug ("removing root window ICC profile atom");
+	g_debug ("removing root window ICC profile atom");
 
 	/* get the value */
 	gdk_error_trap_push ();
@@ -659,7 +657,7 @@ gcm_x11_screen_remove_profile (GcmX11Screen *screen, GError **error)
 
 	g_return_val_if_fail (GCM_IS_X11_SCREEN (screen), FALSE);
 
-	egg_debug ("removing root window ICC profile atom");
+	g_debug ("removing root window ICC profile atom");
 
 	/* get the value */
 	gdk_error_trap_push ();
diff --git a/libcolor-glib/libcolor-glib.h b/libcolor-glib/libcolor-glib.h
index 8f7b898..7ca93cb 100644
--- a/libcolor-glib/libcolor-glib.h
+++ b/libcolor-glib/libcolor-glib.h
@@ -36,6 +36,7 @@
 #include <gcm-ddc-device.h>
 #include <gcm-ddc-client.h>
 #include <gcm-ddc-control.h>
+#include <gcm-sample-window.h>
 #include <gcm-sensor.h>
 #include <gcm-sensor-huey.h>
 #include <gcm-sensor-dummy.h>
@@ -51,6 +52,10 @@
 #include <gcm-profile-store.h>
 #include <gcm-usb.h>
 
+#ifdef LIBCOLOR_GLIB_COMPILATION
+#include <gcm-debug.h>
+#endif
+
 #undef __LIBCOLOR_GLIB_H_INSIDE__
 
 #endif /* __LIBCOLOR_GLIB_H__ */
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8cfbe75..24ac746 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,11 +3,11 @@ data/gcm-import.desktop.in
 data/gcm-prefs.desktop.in
 data/gcm-viewer.ui
 data/org.gnome.color-manager.gschema.xml
+libcolor-glib/gcm-debug.c
 libcolor-glib/gcm-profile.c
 libcolor-glib/gcm-sensor-client.c
 policy/org.gnome.color.policy.in
 src/cc-color-panel.c
-src/egg-debug.c
 src/gcm-apply.c
 src/gcm-calibrate-argyll.c
 src/gcm-calibrate.c
diff --git a/src/Makefile.am b/src/Makefile.am
index b8ad554..8cde79f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,6 +16,7 @@ INCLUDES =						\
 	-DG_UDEV_API_IS_SUBJECT_TO_CHANGE		\
 	$(GUDEV_CFLAGS)					\
 	-I$(top_srcdir)/libcolor-glib			\
+	-DG_LOG_DOMAIN=\"Gcm\"				\
 	-DLIBCOLOR_GLIB_COMPILATION			\
 	-DBINDIR=\"$(bindir)\"				\
 	-DLIBEXECDIR=\"$(libexecdir)\"			\
@@ -39,8 +40,6 @@ ccpanels_CFLAGS =					\
 
 noinst_LIBRARIES = libgcmshared.a
 libgcmshared_a_SOURCES =				\
-	egg-debug.c					\
-	egg-debug.h					\
 	gcm-exif.c					\
 	gcm-exif.h					\
 	gcm-print.c					\
diff --git a/src/cc-color-panel.c b/src/cc-color-panel.c
index 27830b2..2f3e6d7 100644
--- a/src/cc-color-panel.c
+++ b/src/cc-color-panel.c
@@ -29,8 +29,6 @@
 #include <gdk/gdkx.h>
 #include <canberra-gtk.h>
 
-#include "egg-debug.h"
-
 #include "gcm-cell-renderer-profile-text.h"
 #include "gcm-cell-renderer-profile-icon.h"
 #include "gcm-calibrate-argyll.h"
@@ -46,8 +44,6 @@
 #include "gcm-utils.h"
 #include "gcm-color.h"
 
-#include "egg-debug.h"
-
 #include "cc-color-panel.h"
 
 struct _CcColorPanelPrivate {
@@ -144,14 +140,14 @@ cc_color_panel_set_default (CcColorPanel *panel, GcmDevice *device)
 	id = gcm_device_get_id (device);
 	filename = gcm_device_get_default_profile_filename (device);
 	if (filename == NULL) {
-		egg_debug ("no filename for %s", id);
+		g_debug ("no filename for %s", id);
 		goto out;
 	}
 
 	/* run using PolicyKit */
 	install_cmd = g_build_filename (SBINDIR, "gcm-install-system-wide", NULL);
 	cmdline = g_strdup_printf ("pkexec %s --id %s \"%s\"", install_cmd, id, filename);
-	egg_debug ("running: %s", cmdline);
+	g_debug ("running: %s", cmdline);
 	ret = g_spawn_command_line_sync (cmdline, NULL, NULL, NULL, &error);
 	if (!ret) {
 		/* TRANSLATORS: could not save for all users */
@@ -257,10 +253,10 @@ cc_color_panel_viewer_cb (GtkWidget *widget, CcColorPanel *panel)
 
 	/* run with modal set */
 	command = g_strdup_printf ("%s/gcm-viewer --parent-window %u", BINDIR, xid);
-	egg_debug ("running: %s", command);
+	g_debug ("running: %s", command);
 	ret = g_spawn_command_line_async (command, &error);
 	if (!ret) {
-		egg_warning ("failed to run prefs: %s", error->message);
+		g_warning ("failed to run prefs: %s", error->message);
 		g_error_free (error);
 	}
 	g_free (command);
@@ -284,7 +280,7 @@ cc_color_panel_calibrate_display (CcColorPanel *panel, GcmCalibrate *calibrate)
 	/* set properties from the device */
 	ret = gcm_calibrate_set_from_device (calibrate, panel->priv->current_device, &error);
 	if (!ret) {
-		egg_warning ("failed to calibrate: %s", error->message);
+		g_warning ("failed to calibrate: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -292,7 +288,7 @@ cc_color_panel_calibrate_display (CcColorPanel *panel, GcmCalibrate *calibrate)
 	/* clear any VCGT */
 	ret = gcm_device_xrandr_reset (GCM_DEVICE_XRANDR (panel->priv->current_device), &error);
 	if (!ret) {
-		egg_warning ("failed to reset so we can calibrate: %s", error->message);
+		g_warning ("failed to reset so we can calibrate: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -301,7 +297,7 @@ cc_color_panel_calibrate_display (CcColorPanel *panel, GcmCalibrate *calibrate)
 	window = GTK_WINDOW(panel->priv->main_window);
 	ret = gcm_calibrate_display (calibrate, window, &error);
 	if (!ret) {
-		egg_warning ("failed to calibrate: %s", error->message);
+		g_warning ("failed to calibrate: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -310,7 +306,7 @@ out:
 	error = NULL;
 	ret_tmp = gcm_device_apply (panel->priv->current_device, &error);
 	if (!ret_tmp) {
-		egg_warning ("failed to apply profile: %s", error->message);
+		g_warning ("failed to apply profile: %s", error->message);
 		g_error_free (error);
 	}
 	return ret;
@@ -329,7 +325,7 @@ cc_color_panel_calibrate_device (CcColorPanel *panel, GcmCalibrate *calibrate)
 	/* set defaults from device */
 	ret = gcm_calibrate_set_from_device (calibrate, panel->priv->current_device, &error);
 	if (!ret) {
-		egg_warning ("failed to calibrate: %s", error->message);
+		g_warning ("failed to calibrate: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -342,7 +338,7 @@ cc_color_panel_calibrate_device (CcColorPanel *panel, GcmCalibrate *calibrate)
 			/* TRANSLATORS: could not calibrate */
 			cc_color_panel_error_dialog (panel, _("Failed to calibrate device"), error->message);
 		} else {
-			egg_warning ("failed to calibrate: %s", error->message);
+			g_warning ("failed to calibrate: %s", error->message);
 		}
 		g_error_free (error);
 		goto out;
@@ -364,7 +360,7 @@ cc_color_panel_calibrate_printer (CcColorPanel *panel, GcmCalibrate *calibrate)
 	/* set defaults from device */
 	ret = gcm_calibrate_set_from_device (calibrate, panel->priv->current_device, &error);
 	if (!ret) {
-		egg_warning ("failed to calibrate: %s", error->message);
+		g_warning ("failed to calibrate: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -377,7 +373,7 @@ cc_color_panel_calibrate_printer (CcColorPanel *panel, GcmCalibrate *calibrate)
 			/* TRANSLATORS: could not calibrate */
 			cc_color_panel_error_dialog (panel, _("Failed to calibrate printer"), error->message);
 		} else {
-			egg_warning ("failed to calibrate: %s", error->message);
+			g_warning ("failed to calibrate: %s", error->message);
 		}
 		g_error_free (error);
 		goto out;
@@ -455,7 +451,7 @@ cc_color_panel_profile_import_file (CcColorPanel *panel, GFile *file)
 	/* check if correct type */
 	ret = gcm_utils_is_icc_profile (file);
 	if (!ret) {
-		egg_debug ("not a ICC profile");
+		g_debug ("not a ICC profile");
 		goto out;
 	}
 
@@ -494,7 +490,7 @@ cc_color_panel_profile_add_virtual_file (CcColorPanel *panel, GFile *file)
 		    error->code != GCM_EXIF_ERROR_NO_SUPPORT)
 			cc_color_panel_error_dialog (panel, _("Failed to get metadata from image"), error->message);
 		else
-			egg_debug ("not a supported image format: %s", error->message);
+			g_debug ("not a supported image format: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -556,7 +552,7 @@ cc_color_panel_drag_data_received_cb (GtkWidget *widget, GdkDragContext *context
 		goto out;
 
 	/* import this */
-	egg_debug ("dropped: %p (%s)", data, filename);
+	g_debug ("dropped: %p (%s)", data, filename);
 
 	/* split, as multiple drag targets are accepted */
 	filenames = g_strsplit_set ((const gchar *)filename, "\r\n", -1);
@@ -604,7 +600,7 @@ cc_color_panel_virtual_set_from_file (CcColorPanel *panel, GFile *file)
 	exif = gcm_exif_new ();
 	ret = gcm_exif_parse (exif, file, &error);
 	if (!ret) {
-		egg_warning ("failed to parse file: %s", error->message);
+		g_warning ("failed to parse file: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -652,7 +648,7 @@ cc_color_panel_virtual_drag_data_received_cb (GtkWidget *widget, GdkDragContext
 	}
 
 	/* import this */
-	egg_debug ("dropped: %p (%s)", data, filename);
+	g_debug ("dropped: %p (%s)", data, filename);
 
 	/* split, as multiple drag targets are accepted */
 	filenames = g_strsplit_set ((const gchar *)filename, "\r\n", -1);
@@ -663,11 +659,11 @@ cc_color_panel_virtual_drag_data_received_cb (GtkWidget *widget, GdkDragContext
 			continue;
 
 		/* check this is an ICC profile */
-		egg_debug ("trying to set %s", filenames[i]);
+		g_debug ("trying to set %s", filenames[i]);
 		file = g_file_new_for_uri (filenames[i]);
 		ret = cc_color_panel_virtual_set_from_file (panel, file);
 		if (!ret) {
-			egg_debug ("%s did not set from file correctly", filenames[i]);
+			g_debug ("%s did not set from file correctly", filenames[i]);
 			gtk_drag_finish (context, FALSE, FALSE, _time);
 			goto out;
 		}
@@ -700,7 +696,7 @@ cc_color_panel_ensure_argyllcms_installed (CcColorPanel *panel)
 		goto out;
 
 #ifndef HAVE_PACKAGEKIT
-	egg_warning ("cannot install: this package was not compiled with --enable-packagekit");
+	g_warning ("cannot install: this package was not compiled with --enable-packagekit");
 	goto out;
 #endif
 
@@ -778,20 +774,20 @@ cc_color_panel_calibrate_cb (GtkWidget *widget, CcColorPanel *panel)
 		ret = cc_color_panel_calibrate_printer (panel, calibrate);
 		break;
 	default:
-		egg_warning ("calibration and/or profiling not supported for this device");
+		g_warning ("calibration and/or profiling not supported for this device");
 		goto out;
 	}
 
 	/* we failed to calibrate */
 	if (!ret) {
-		egg_warning ("failed to calibrate");
+		g_warning ("failed to calibrate");
 		goto out;
 	}
 
 	/* failed to get profile */
 	filename = gcm_calibrate_get_filename_result (calibrate);
 	if (filename == NULL) {
-		egg_warning ("failed to get filename from calibration");
+		g_warning ("failed to get filename from calibration");
 		goto out;
 	}
 
@@ -800,7 +796,7 @@ cc_color_panel_calibrate_cb (GtkWidget *widget, CcColorPanel *panel)
 	dest = gcm_utils_get_profile_destination (file);
 	ret = gcm_utils_mkdir_and_copy (file, dest, &error);
 	if (!ret) {
-		egg_warning ("failed to calibrate: %s", error->message);
+		g_warning ("failed to calibrate: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -812,20 +808,20 @@ cc_color_panel_calibrate_cb (GtkWidget *widget, CcColorPanel *panel)
 		profile = g_ptr_array_index (profile_array, i);
 		name = gcm_profile_get_filename (profile);
 		if (g_strcmp0 (name, destination) == 0) {
-			egg_debug ("found existing profile: %s", destination);
+			g_debug ("found existing profile: %s", destination);
 			break;
 		}
 	}
 
 	/* we didn't find an existing profile */
 	if (i == profile_array->len) {
-		egg_debug ("adding: %s", destination);
+		g_debug ("adding: %s", destination);
 
 		/* set this default */
 		gcm_device_set_default_profile_filename (panel->priv->current_device, destination);
 		ret = gcm_device_save (panel->priv->current_device, &error);
 		if (!ret) {
-			egg_warning ("failed to save default: %s", error->message);
+			g_warning ("failed to save default: %s", error->message);
 			g_error_free (error);
 			goto out;
 		}
@@ -1001,7 +997,7 @@ set_profiles:
 	/* save */
 	ret = gcm_device_save (panel->priv->current_device, &error);
 	if (!ret) {
-		egg_warning ("failed to save config: %s", error->message);
+		g_warning ("failed to save config: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -1009,7 +1005,7 @@ set_profiles:
 	/* set the profile */
 	ret = gcm_device_apply (panel->priv->current_device, &error);
 	if (!ret) {
-		egg_warning ("failed to apply profile: %s", error->message);
+		g_warning ("failed to apply profile: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -1054,7 +1050,7 @@ cc_color_panel_assign_remove_cb (GtkWidget *widget, CcColorPanel *panel)
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "treeview_assign"));
 	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
 	if (!gtk_tree_selection_get_selected (selection, &model, &iter)) {
-		egg_debug ("no row selected");
+		g_debug ("no row selected");
 		goto out;
 	}
 
@@ -1070,7 +1066,7 @@ cc_color_panel_assign_remove_cb (GtkWidget *widget, CcColorPanel *panel)
 	if (gcm_device_get_kind (panel->priv->current_device) == GCM_DEVICE_KIND_DISPLAY) {
 		device_md5 = gcm_device_xrandr_get_edid_md5 (GCM_DEVICE_XRANDR (panel->priv->current_device));
 		if (g_strstr_len (gcm_profile_get_filename (profile), -1, device_md5) != NULL) {
-			egg_debug ("removed an auto-profile, so disabling add for device");
+			g_debug ("removed an auto-profile, so disabling add for device");
 			gcm_device_set_use_edid_profile (panel->priv->current_device, FALSE);
 		}
 	}
@@ -1148,7 +1144,7 @@ cc_color_panel_assign_make_default_cb (GtkWidget *widget, CcColorPanel *panel)
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "treeview_assign"));
 	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
 	if (!gtk_tree_selection_get_selected (selection, &model, &iter)) {
-		egg_debug ("no row selected");
+		g_debug ("no row selected");
 		return;
 	}
 
@@ -1332,7 +1328,6 @@ cc_color_panel_delete_cb (GtkWidget *widget, CcColorPanel *panel)
 	}
 }
 
-
 /**
  * cc_color_panel_save_and_apply_current_device_cb:
  **/
@@ -1361,7 +1356,7 @@ cc_color_panel_save_and_apply_current_device_cb (CcColorPanel *panel)
 	/* save new profile */
 	ret = gcm_device_save (panel->priv->current_device, &error);
 	if (!ret) {
-		egg_warning ("failed to save config: %s", error->message);
+		g_warning ("failed to save config: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -1369,7 +1364,7 @@ cc_color_panel_save_and_apply_current_device_cb (CcColorPanel *panel)
 	/* actually set the new profile */
 	ret = gcm_device_apply (panel->priv->current_device, &error);
 	if (!ret) {
-		egg_warning ("failed to apply profile: %s", error->message);
+		g_warning ("failed to apply profile: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -1393,7 +1388,7 @@ cc_color_panel_reset_cb (GtkWidget *widget, CcColorPanel *panel)
 
 	/* if we've already queued a save and apply, ignore this */
 	if (panel->priv->save_and_apply_id != 0) {
-		egg_debug ("ignoring extra save and apply, as one is already pending");
+		g_debug ("ignoring extra save and apply, as one is already pending");
 		return;
 	}
 	panel->priv->save_and_apply_id =
@@ -1581,7 +1576,7 @@ cc_color_panel_devices_treeview_clicked_cb (GtkTreeSelection *selection, CcColor
 
 	/* This will only work in single or browse selection mode! */
 	if (!gtk_tree_selection_get_selected (selection, &model, &iter)) {
-		egg_debug ("no row selected");
+		g_debug ("no row selected");
 		goto out;
 	}
 
@@ -1591,7 +1586,7 @@ cc_color_panel_devices_treeview_clicked_cb (GtkTreeSelection *selection, CcColor
 			    -1);
 
 	/* we have a new device */
-	egg_debug ("selected device is: %s", id);
+	g_debug ("selected device is: %s", id);
 	if (panel->priv->current_device != NULL) {
 		g_object_unref (panel->priv->current_device);
 		panel->priv->current_device = NULL;
@@ -1731,7 +1726,7 @@ cc_color_panel_assign_treeview_clicked_cb (GtkTreeSelection *selection, CcColorP
 		widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "button_assign_remove"));
 		gtk_widget_set_sensitive (widget, FALSE);
 
-		egg_debug ("no row selected");
+		g_debug ("no row selected");
 		return;
 	}
 
@@ -1740,7 +1735,7 @@ cc_color_panel_assign_treeview_clicked_cb (GtkTreeSelection *selection, CcColorP
 			    GCM_ASSIGN_COLUMN_PROFILE, &profile,
 			    GCM_ASSIGN_COLUMN_IS_DEFAULT, &is_default,
 			    -1);
-	egg_debug ("selected profile = %s", gcm_profile_get_filename (profile));
+	g_debug ("selected profile = %s", gcm_profile_get_filename (profile));
 
 	/* is the element the first in the list */
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "button_assign_make_default"));
@@ -1785,7 +1780,7 @@ cc_color_panel_add_device_xrandr (CcColorPanel *panel, GcmDevice *device)
 
 	/* sanity check */
 	if (!GCM_IS_DEVICE_XRANDR (device)) {
-		egg_warning ("not a xrandr device");
+		g_warning ("not a xrandr device");
 		goto out;
 	}
 
@@ -1796,7 +1791,7 @@ cc_color_panel_add_device_xrandr (CcColorPanel *panel, GcmDevice *device)
 		/* set the gamma on the device */
 		ret = gcm_device_apply (device, &error);
 		if (!ret) {
-			egg_warning ("failed to apply profile: %s", error->message);
+			g_warning ("failed to apply profile: %s", error->message);
 			g_error_free (error);
 		}
 
@@ -1819,7 +1814,7 @@ cc_color_panel_add_device_xrandr (CcColorPanel *panel, GcmDevice *device)
 
 	/* add to list */
 	id = gcm_device_get_id (device);
-	egg_debug ("add %s to device list", id);
+	g_debug ("add %s to device list", id);
 	gtk_list_store_append (panel->priv->list_store_devices, &iter);
 	gtk_list_store_set (panel->priv->list_store_devices, &iter,
 			    GCM_DEVICES_COLUMN_ID, id,
@@ -1891,7 +1886,7 @@ cc_color_panel_profile_combo_changed_cb (GtkWidget *widget, CcColorPanel *panel)
 	if (entry_type == GCM_PREFS_ENTRY_TYPE_IMPORT) {
 		file = cc_color_panel_file_chooser_get_icc_profile (panel);
 		if (file == NULL) {
-			egg_warning ("failed to get ICC file");
+			g_warning ("failed to get ICC file");
 			gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
 			goto out;
 		}
@@ -1904,7 +1899,7 @@ cc_color_panel_profile_combo_changed_cb (GtkWidget *widget, CcColorPanel *panel)
 			gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
 
 			uri = g_file_get_uri (file);
-			egg_debug ("%s did not import correctly", uri);
+			g_debug ("%s did not import correctly", uri);
 			g_free (uri);
 			goto out;
 		}
@@ -1916,7 +1911,7 @@ cc_color_panel_profile_combo_changed_cb (GtkWidget *widget, CcColorPanel *panel)
 		if (!ret) {
 			/* set to first entry */
 			gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
-			egg_warning ("failed to parse ICC file: %s", error->message);
+			g_warning ("failed to parse ICC file: %s", error->message);
 			g_error_free (error);
 			goto out;
 		}
@@ -1958,13 +1953,13 @@ cc_color_panel_slider_changed_cb (GtkRange *range, CcColorPanel *panel)
 {
 	/* we're just setting up the device, not moving the slider */
 	if (panel->priv->setting_up_device) {
-		egg_debug ("setting up device, so ignore");
+		g_debug ("setting up device, so ignore");
 		return;
 	}
 
 	/* if we've already queued a save and apply, ignore this */
 	if (panel->priv->save_and_apply_id != 0) {
-		egg_debug ("ignoring extra save and apply, as one is already pending");
+		g_debug ("ignoring extra save and apply, as one is already pending");
 		return;
 	}
 
@@ -2085,7 +2080,7 @@ cc_color_panel_remove_device (CcColorPanel *panel, GcmDevice *gcm_device)
 
 	/* remove */
 	id = gcm_device_get_id (gcm_device);
-	egg_debug ("removing: %s (connected: %i)", id,
+	g_debug ("removing: %s (connected: %i)", id,
 		   gcm_device_get_connected (gcm_device));
 
 	/* get first element */
@@ -2115,7 +2110,7 @@ static void
 cc_color_panel_added_cb (GcmClient *client, GcmDevice *device, CcColorPanel *panel)
 {
 	GcmDeviceKind kind;
-	egg_debug ("added: %s (connected: %i, saved: %i)",
+	g_debug ("added: %s (connected: %i, saved: %i)",
 		   gcm_device_get_id (device),
 		   gcm_device_get_connected (device),
 		   gcm_device_get_saved (device));
@@ -2142,11 +2137,11 @@ cc_color_panel_changed_cb (GcmClient *client, GcmDevice *device, CcColorPanel *p
 	/* no not re-add to the ui if we just deleted this */
 	if (!gcm_device_get_connected (device) &&
 	    !gcm_device_get_saved (device)) {
-		egg_warning ("ignoring uninteresting device: %s", gcm_device_get_id (device));
+		g_warning ("ignoring uninteresting device: %s", gcm_device_get_id (device));
 		return;
 	}
 
-	egg_debug ("changed: %s", gcm_device_get_id (device));
+	g_debug ("changed: %s", gcm_device_get_id (device));
 
 	/* remove the saved device if it's already there */
 	cc_color_panel_remove_device (panel, device);
@@ -2272,7 +2267,7 @@ cc_color_panel_space_combo_changed_cb (GtkWidget *widget, CcColorPanel *panel)
 		goto out;
 
 	filename = gcm_profile_get_filename (profile);
-	egg_debug ("changed working space %s", filename);
+	g_debug ("changed working space %s", filename);
 	g_settings_set_string (panel->priv->settings, key, filename);
 out:
 	if (profile != NULL)
@@ -2294,7 +2289,7 @@ cc_color_panel_renderer_combo_changed_cb (GtkWidget *widget, CcColorPanel *panel
 		return;
 
 	/* save to GSettings */
-	egg_debug ("changed rendering intent to %s", gcm_intent_to_string (active+1));
+	g_debug ("changed rendering intent to %s", gcm_intent_to_string (active+1));
 	g_settings_set_enum (panel->priv->settings, key, active+1);
 }
 
@@ -2341,7 +2336,7 @@ cc_color_panel_is_color_profiles_extra_installed_ready_cb (GObject *source_objec
 	response = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object), res, &error);
 	if (response == NULL) {
 		/* TRANSLATORS: the DBus method failed */
-		egg_warning ("%s %s\n", _("The request failed:"), error->message);
+		g_warning ("%s %s\n", _("The request failed:"), error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -2367,7 +2362,7 @@ cc_color_panel_is_color_profiles_extra_installed (CcColorPanel *panel)
 	GError *error = NULL;
 
 #ifndef HAVE_PACKAGEKIT
-	egg_warning ("cannot query %s: this package was not compiled with --enable-packagekit", package_name);
+	g_warning ("cannot query %s: this package was not compiled with --enable-packagekit", package_name);
 	return;
 #endif
 
@@ -2474,7 +2469,7 @@ cc_color_panel_startup_idle_cb (CcColorPanel *panel)
 	/* coldplug plugged in devices */
 	ret = gcm_client_coldplug (panel->priv->gcm_client, GCM_CLIENT_COLDPLUG_ALL, &error);
 	if (!ret) {
-		egg_warning ("failed to add connected devices: %s", error->message);
+		g_warning ("failed to add connected devices: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -2486,7 +2481,7 @@ cc_color_panel_startup_idle_cb (CcColorPanel *panel)
 	panel->priv->main_window = gtk_widget_get_toplevel (panel->priv->info_bar_profiles);
 
 	/* do we show the shared-color-profiles-extra installer? */
-	egg_debug ("getting installed");
+	g_debug ("getting installed");
 	cc_color_panel_is_color_profiles_extra_installed (panel);
 out:
 	g_free (colorspace_rgb);
@@ -2519,7 +2514,7 @@ cc_color_panel_apply_all_devices_idle_cb (CcColorPanel *panel)
 		/* set gamma for device */
 		ret = gcm_device_apply (device, &error);
 		if (!ret) {
-			egg_warning ("failed to set profile: %s", error->message);
+			g_warning ("failed to set profile: %s", error->message);
 			g_error_free (error);
 			break;
 		}
@@ -2741,7 +2736,7 @@ cc_color_panel_init (CcColorPanel *panel)
 	panel->priv->builder = gtk_builder_new ();
 	retval = gtk_builder_add_from_file (panel->priv->builder, GCM_DATA "/gcm-prefs.ui", &error);
 	if (retval == 0) {
-		egg_error ("failed to load ui: %s", error->message);
+		g_error ("failed to load ui: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
diff --git a/src/gcm-apply.c b/src/gcm-apply.c
index e538eae..5feb064 100644
--- a/src/gcm-apply.c
+++ b/src/gcm-apply.c
@@ -26,11 +26,10 @@
 #include <math.h>
 #include <locale.h>
 
-#include "egg-debug.h"
-
 #include "gcm-utils.h"
 #include "gcm-client.h"
 #include "gcm-device-xrandr.h"
+#include "gcm-debug.h"
 
 /**
  * gcm_apply_create_icc_profile_for_edid:
@@ -67,7 +66,7 @@ gcm_apply_create_icc_profile_for_edid (GcmDevice *device, const gchar *filename,
 
 	/* do we set this by default? */
 	if (!gcm_device_get_use_edid_profile (device)) {
-		egg_debug ("not using auto-edid profile as device profile");
+		g_debug ("not using auto-edid profile as device profile");
 		goto out;
 	}
 
@@ -81,7 +80,7 @@ gcm_apply_create_icc_profile_for_edid (GcmDevice *device, const gchar *filename,
 	} else {
 		/* if this failed, it's because it's already associated
 		 * with the device which is okay with us */
-		egg_debug ("already added auto-edid profile, not adding %s",
+		g_debug ("already added auto-edid profile, not adding %s",
 			   gcm_profile_get_checksum (profile));
 		ret = TRUE;
 	}
@@ -127,7 +126,7 @@ main (int argc, char **argv)
 
 	context = g_option_context_new ("gnome-color-manager apply program");
 	g_option_context_add_main_entries (context, options, NULL);
-	g_option_context_add_group (context, egg_debug_get_option_group ());
+	g_option_context_add_group (context, gcm_debug_get_option_group ());
 	g_option_context_add_group (context, gtk_get_option_group (TRUE));
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
@@ -139,7 +138,7 @@ main (int argc, char **argv)
 	 */
 	ret = g_spawn_command_line_async ("gconftool-2 --set --type=bool /apps/gnome_settings_daemon/plugins/color/active true", &error);
 	if (!ret) {
-		egg_warning ("failed to install GConf key: %s", error->message);
+		g_warning ("failed to install GConf key: %s", error->message);
 		/* non-fatal */
 		g_clear_error (&error);
 	}
@@ -148,7 +147,7 @@ main (int argc, char **argv)
 	client = gcm_client_new ();
 	ret = gcm_client_coldplug (client, GCM_CLIENT_COLDPLUG_XRANDR, &error);
 	if (!ret) {
-		egg_warning ("failed to get devices: %s", error->message);
+		g_warning ("failed to get devices: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -165,12 +164,12 @@ main (int argc, char **argv)
 		filename = g_strdup_printf ("edid-%s.icc", gcm_device_xrandr_get_edid_md5 (GCM_DEVICE_XRANDR (device)));
 		path = g_build_filename (g_get_user_data_dir (), "icc", filename, NULL);
 		if (g_file_test (path, G_FILE_TEST_EXISTS)) {
-			egg_debug ("auto-profile edid %s exists", path);
+			g_debug ("auto-profile edid %s exists", path);
 		} else {
-			egg_debug ("auto-profile edid does not exist, creating as %s", path);
+			g_debug ("auto-profile edid does not exist, creating as %s", path);
 			ret = gcm_apply_create_icc_profile_for_edid (device, path, &error);
 			if (!ret) {
-				egg_warning ("failed to create profile from EDID data: %s",
+				g_warning ("failed to create profile from EDID data: %s",
 					     error->message);
 				g_clear_error (&error);
 			}
@@ -179,11 +178,11 @@ main (int argc, char **argv)
 		g_free (path);
 
 		/* set gamma for device */
-		egg_debug ("applying default profile for device: %s", gcm_device_get_id (device));
+		g_debug ("applying default profile for device: %s", gcm_device_get_id (device));
 		ret = gcm_device_apply (device, &error);
 		if (!ret) {
 			retval = 1;
-			egg_warning ("failed to set gamma: %s", error->message);
+			g_warning ("failed to set gamma: %s", error->message);
 			g_error_free (error);
 			break;
 		}
diff --git a/src/gcm-calibrate-argyll.c b/src/gcm-calibrate-argyll.c
index 873edb9..d6848ab 100644
--- a/src/gcm-calibrate-argyll.c
+++ b/src/gcm-calibrate-argyll.c
@@ -48,8 +48,6 @@
 #include "gcm-color.h"
 #include "gcm-calibrate-dialog.h"
 
-#include "egg-debug.h"
-
 #define FIXED_ARGYLL
 
 //#define USE_DOUBLE_DENSITY
@@ -267,7 +265,7 @@ gcm_calibrate_argyll_get_display (const gchar *output_name, GError **error)
 		g_strdelimit (name, " ", '\0');
 		if (g_strcmp0 (output_name, &name[26]) == 0) {
 			display = atoi (&name[4]);
-			egg_debug ("found %s mapped to %i", output_name, display);
+			g_debug ("found %s mapped to %i", output_name, display);
 		}
 		g_free (name);
 	}
@@ -315,7 +313,7 @@ gcm_calibrate_argyll_debug_argv (const gchar *program, gchar **argv)
 {
 	gchar *join;
 	join = g_strjoinv ("  ", argv);
-	egg_debug ("running %s  %s", program, join);
+	g_debug ("running %s  %s", program, join);
 	g_free (join);
 }
 
@@ -519,7 +517,6 @@ out:
 	return ret;
 }
 
-
 /**
  * gcm_calibrate_argyll_display_read_chart:
  **/
@@ -1330,7 +1327,7 @@ gcm_calibrate_argyll_remove_temp_files (GcmCalibrateArgyll *calibrate_argyll, GE
 			filename_tmp = g_strdup_printf ("%s/%s.%s", working_path, basename, exts[i]);
 			ret = g_file_test (filename_tmp, G_FILE_TEST_IS_REGULAR);
 			if (ret) {
-				egg_debug ("removing %s", filename_tmp);
+				g_debug ("removing %s", filename_tmp);
 				g_unlink (filename_tmp);
 			}
 			g_free (filename_tmp);
@@ -1342,7 +1339,7 @@ gcm_calibrate_argyll_remove_temp_files (GcmCalibrateArgyll *calibrate_argyll, GE
 		filename_tmp = g_strdup_printf ("%s/%s", working_path, filenames[i]);
 		ret = g_file_test (filename_tmp, G_FILE_TEST_IS_REGULAR);
 		if (ret) {
-			egg_debug ("removing %s", filename_tmp);
+			g_debug ("removing %s", filename_tmp);
 			g_unlink (filename_tmp);
 		}
 		g_free (filename_tmp);
@@ -1708,7 +1705,7 @@ gcm_calibrate_argyll_render_cb (GcmPrint *print, GtkPageSetup *page_setup, GcmCa
 		if (g_str_has_prefix (filename, basename) &&
 		    g_str_has_suffix (filename, ".tif")) {
 			filename_tmp = g_build_filename (working_path, filename, NULL);
-			egg_debug ("add print page %s", filename_tmp);
+			g_debug ("add print page %s", filename_tmp);
 			g_ptr_array_add (array, filename_tmp);
 		}
 		filename = g_dir_read_name (dir);
@@ -1764,7 +1761,7 @@ gcm_calibrate_argyll_set_device_from_ti2 (GcmCalibrate *calibrate, const gchar *
 		device_ptr = device + 7;
 
 	/* set for calibration */
-	egg_debug ("setting instrument to '%s'", device_ptr);
+	g_debug ("setting instrument to '%s'", device_ptr);
 	g_object_set (calibrate,
 		      "device", device_ptr,
 		      NULL);
@@ -1834,7 +1831,7 @@ gcm_calibrate_argyll_printer_convert_jpeg (GcmCalibrateArgyll *calibrate_argyll,
 			g_strlcpy (filename_jpg+len-4, ".jpg", 5);
 
 			/* convert from tiff to jpg */
-			egg_debug ("convert %s to %s", filename_tiff, filename_jpg);
+			g_debug ("convert %s to %s", filename_tiff, filename_jpg);
 			pixbuf = gdk_pixbuf_new_from_file (filename_tiff, error);
 			if (pixbuf == NULL) {
 				ret = FALSE;
@@ -1923,7 +1920,7 @@ gcm_calibrate_argyll_printer (GcmCalibrate *calibrate, GtkWindow *window, GError
 			goto out;
 
 		cmdline = g_strdup_printf ("nautilus \"%s\"", working_path);
-		egg_debug ("we need to open the directory we're using: %s", cmdline);
+		g_debug ("we need to open the directory we're using: %s", cmdline);
 		ret = g_spawn_command_line_async (cmdline, error);
 		goto out;
 	}
@@ -2203,7 +2200,7 @@ gcm_calibrate_argyll_exit_cb (VteTerminal *terminal, GcmCalibrateArgyll *calibra
 
 	/* get the child exit status */
 	exit_status = vte_terminal_get_child_exit_status (terminal);
-	egg_debug ("child exit-status is %i", exit_status);
+	g_debug ("child exit-status is %i", exit_status);
 	if (exit_status == 0)
 		priv->response = GTK_RESPONSE_ACCEPT;
 	else
@@ -2239,7 +2236,7 @@ gcm_calibrate_argyll_interaction_attach (GcmCalibrateArgyll *calibrate_argyll)
 
 	/* different tools assume the device is not on the screen */
 	if (priv->already_on_window) {
-		egg_debug ("VTE: already on screen so faking keypress");
+		g_debug ("VTE: already on screen so faking keypress");
 		priv->keypress_id = g_timeout_add_seconds (1,
 							   (GSourceFunc) gcm_calibrate_argyll_timeout_cb,
 							   calibrate_argyll);
@@ -2265,7 +2262,7 @@ gcm_calibrate_argyll_interaction_attach (GcmCalibrateArgyll *calibrate_argyll)
 	}
 
 	/* block for a response */
-	egg_debug ("blocking waiting for user input: %s", title);
+	g_debug ("blocking waiting for user input: %s", title);
 
 	/* push new messages into the UI */
 	gcm_calibrate_dialog_show (priv->calibrate_dialog, GCM_CALIBRATE_DIALOG_TAB_GENERIC, title, message);
@@ -2308,7 +2305,7 @@ gcm_calibrate_argyll_interaction_calibrate (GcmCalibrateArgyll *calibrate_argyll
 	title = _("Please configure instrument");
 
 	/* block for a response */
-	egg_debug ("blocking waiting for user input: %s", title);
+	g_debug ("blocking waiting for user input: %s", title);
 
 	/* get the image, if we have one */
 	filename = gcm_calibrate_argyll_get_sensor_image_calibrate (calibrate_argyll);
@@ -2363,7 +2360,7 @@ gcm_calibrate_argyll_interaction_surface (GcmCalibrateArgyll *calibrate_argyll)
 	title = _("Please configure instrument");
 
 	/* block for a response */
-	egg_debug ("blocking waiting for user input: %s", title);
+	g_debug ("blocking waiting for user input: %s", title);
 
 	/* get the image, if we have one */
 	filename = gcm_calibrate_argyll_get_sensor_image_screen (calibrate_argyll);
@@ -2419,7 +2416,7 @@ gcm_calibrate_argyll_process_output_cmd (GcmCalibrateArgyll *calibrate_argyll, c
 
 	/* attach device */
 	if (g_strcmp0 (line, "Place instrument on test window.") == 0) {
-		egg_debug ("VTE: interaction required: %s", line);
+		g_debug ("VTE: interaction required: %s", line);
 		gcm_calibrate_argyll_interaction_attach (calibrate_argyll);
 		ret = FALSE;
 		goto out;
@@ -2427,7 +2424,7 @@ gcm_calibrate_argyll_process_output_cmd (GcmCalibrateArgyll *calibrate_argyll, c
 
 	/* set to calibrate */
 	if (g_strcmp0 (line, "Set instrument sensor to calibration position,") == 0) {
-		egg_debug ("VTE: interaction required, set to calibrate");
+		g_debug ("VTE: interaction required, set to calibrate");
 		gcm_calibrate_argyll_interaction_calibrate (calibrate_argyll);
 		ret = FALSE;
 		goto out;
@@ -2435,7 +2432,7 @@ gcm_calibrate_argyll_process_output_cmd (GcmCalibrateArgyll *calibrate_argyll, c
 
 	/* set to calibrate */
 	if (g_strcmp0 (line, "(Sensor should be in surface position)") == 0) {
-		egg_debug ("VTE: interaction required, set to surface");
+		g_debug ("VTE: interaction required, set to surface");
 		gcm_calibrate_argyll_interaction_surface (calibrate_argyll);
 		ret = FALSE;
 		goto out;
@@ -2483,7 +2480,7 @@ gcm_calibrate_argyll_process_output_cmd (GcmCalibrateArgyll *calibrate_argyll, c
 	    g_strstr_len (line, -1, "User Aborted") != NULL ||
 	    g_str_has_prefix (line, "Perspective correction factors") ||
 	    g_str_has_suffix (line, "key to continue:")) {
-		egg_debug ("VTE: ignore: %s", line);
+		g_debug ("VTE: ignore: %s", line);
 		goto out;
 	}
 
@@ -2491,7 +2488,7 @@ gcm_calibrate_argyll_process_output_cmd (GcmCalibrateArgyll *calibrate_argyll, c
 	found = g_strstr_len (line, -1, "Result is XYZ");
 	if (found != NULL) {
 		GcmColorXYZ *xyz;
-		egg_warning ("line=%s", line);
+		g_warning ("line=%s", line);
 		split = g_strsplit (line, " ", -1);
 		xyz = gcm_color_new_XYZ ();
 		g_object_set (xyz,
@@ -2537,7 +2534,7 @@ gcm_calibrate_argyll_process_output_cmd (GcmCalibrateArgyll *calibrate_argyll, c
 		gcm_calibrate_dialog_set_show_button_ok (priv->calibrate_dialog, FALSE);
 		gcm_calibrate_dialog_set_show_expander (priv->calibrate_dialog, TRUE);
 
-		egg_debug ("VTE: error: %s", found+8);
+		g_debug ("VTE: error: %s", found+8);
 
 		/* set state */
 		priv->state = GCM_CALIBRATE_ARGYLL_STATE_WAITING_FOR_LOOP;
@@ -2635,7 +2632,6 @@ gcm_calibrate_argyll_process_output_cmd (GcmCalibrateArgyll *calibrate_argyll, c
 		goto out;
 	}
 
-
 	/* reading strip */
 	if (g_str_has_prefix (line, "Spot read failed due to misread")) {
 
@@ -2691,7 +2687,7 @@ gcm_calibrate_argyll_process_output_cmd (GcmCalibrateArgyll *calibrate_argyll, c
 	}
 
 	/* report a warning so friendly people report bugs */
-	egg_warning ("VTE: could not screenscrape: %s", line);
+	g_warning ("VTE: could not screenscrape: %s", line);
 out:
 	g_free (title_str);
 	g_strfreev (split);
@@ -2770,7 +2766,7 @@ gcm_calibrate_argyll_response_cb (GtkWidget *widget, GtkResponseType response, G
 
 		/* send input if waiting */
 		if (priv->state == GCM_CALIBRATE_ARGYLL_STATE_WAITING_FOR_STDIN) {
-			egg_debug ("sending '%s' to argyll", priv->argyllcms_ok);
+			g_debug ("sending '%s' to argyll", priv->argyllcms_ok);
 #ifdef HAVE_VTE
 			vte_terminal_feed_child (VTE_TERMINAL(priv->terminal), priv->argyllcms_ok, 1);
 #endif
@@ -2792,7 +2788,7 @@ gcm_calibrate_argyll_response_cb (GtkWidget *widget, GtkResponseType response, G
 
 		/* send input if waiting */
 		if (priv->state == GCM_CALIBRATE_ARGYLL_STATE_WAITING_FOR_STDIN) {
-			egg_debug ("sending 'Q' to argyll");
+			g_debug ("sending 'Q' to argyll");
 #ifdef HAVE_VTE
 			vte_terminal_feed_child (VTE_TERMINAL(priv->terminal), "Q", 1);
 #endif
@@ -2936,7 +2932,7 @@ gcm_calibrate_argyll_finalize (GObject *object)
 
 	/* process running */
 	if (priv->child_pid != -1) {
-		egg_debug ("killing child");
+		g_debug ("killing child");
 		kill (priv->child_pid, SIGKILL);
 
 		/* wait until child has quit */
diff --git a/src/gcm-calibrate-dialog.c b/src/gcm-calibrate-dialog.c
index 8da343c..24eba20 100644
--- a/src/gcm-calibrate-dialog.c
+++ b/src/gcm-calibrate-dialog.c
@@ -36,8 +36,6 @@
 #include "gcm-calibrate-dialog.h"
 #include "gcm-utils.h"
 
-#include "egg-debug.h"
-
 static void     gcm_calibrate_dialog_finalize	(GObject     *object);
 
 #define GCM_CALIBRATE_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_CALIBRATE_DIALOG, GcmCalibrateDialogPrivate))
@@ -227,7 +225,7 @@ gcm_calibrate_dialog_set_image_filename_private (GcmCalibrateDialog *calibrate_d
 		filename = g_build_filename (GCM_DATA, "icons", image_filename, NULL);
 		pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 200, 400, &error);
 		if (pixbuf == NULL) {
-			egg_warning ("failed to load image: %s", error->message);
+			g_warning ("failed to load image: %s", error->message);
 			g_error_free (error);
 			gtk_widget_hide (widget);
 		} else {
@@ -286,7 +284,7 @@ gcm_calibrate_dialog_set_window	(GcmCalibrateDialog *calibrate_dialog, GtkWindow
 	/* ensure it's not the same thing */
 	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "dialog_calibrate"));
 	if (GTK_WINDOW (widget) == window) {
-		egg_warning ("trying to set parent to self!");
+		g_warning ("trying to set parent to self!");
 		return;
 	}
 
@@ -312,7 +310,7 @@ GtkResponseType
 gcm_calibrate_dialog_run (GcmCalibrateDialog *calibrate_dialog)
 {
 	if (g_main_loop_is_running (calibrate_dialog->priv->loop)) {
-		egg_warning ("you can't call this recursively");
+		g_warning ("you can't call this recursively");
 		return GTK_RESPONSE_NONE;
 	}
 
@@ -388,7 +386,7 @@ gcm_calibrate_dialog_show (GcmCalibrateDialog		*calibrate_dialog,
 	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "dialog_calibrate"));
 	if (calibrate_dialog->priv->move_window) {
 		gtk_window_get_position (GTK_WINDOW (widget), &x, &y);
-		egg_debug ("currently at %i,%i, moving left", x, y);
+		g_debug ("currently at %i,%i, moving left", x, y);
 		gtk_window_move (GTK_WINDOW (widget), 10, y);
 	}
 
@@ -421,7 +419,7 @@ gcm_calibrate_dialog_pop (GcmCalibrateDialog *calibrate_dialog)
 	/* save in case we need to reuse */
 	len = priv->cached_dialogs->len;
 	if (len < 2) {
-		egg_warning ("cannot pop dialog as nothing to recover");
+		g_warning ("cannot pop dialog as nothing to recover");
 		return;
 	}
 	dialog = g_ptr_array_index (priv->cached_dialogs, len-2);
@@ -775,7 +773,7 @@ gcm_calibrate_dialog_init (GcmCalibrateDialog *calibrate_dialog)
 	calibrate_dialog->priv->builder = gtk_builder_new ();
 	retval = gtk_builder_add_from_file (calibrate_dialog->priv->builder, GCM_DATA "/gcm-calibrate.ui", &error);
 	if (retval == 0) {
-		egg_error ("failed to load ui: %s", error->message);
+		g_error ("failed to load ui: %s", error->message);
 		g_error_free (error);
 	}
 
diff --git a/src/gcm-calibrate-manual.c b/src/gcm-calibrate-manual.c
index 821e7de..b9e2d7b 100644
--- a/src/gcm-calibrate-manual.c
+++ b/src/gcm-calibrate-manual.c
@@ -33,16 +33,12 @@
 #include <gtk/gtk.h>
 #include <math.h>
 
-#include "egg-debug.h"
-
 #include "gcm-utils.h"
 #include "gcm-clut.h"
 #include "gcm-gamma-widget.h"
 #include "gcm-trc-widget.h"
 #include "gcm-calibrate-manual.h"
 
-#include "egg-debug.h"
-
 static void     gcm_calibrate_manual_finalize	(GObject     *object);
 
 #define GCM_CALIBRATE_MANUAL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_CALIBRATE_MANUAL, GcmCalibrateManualPrivate))
@@ -84,7 +80,6 @@ enum {
 
 G_DEFINE_TYPE (GcmCalibrateManual, gcm_calibrate_manual, GCM_TYPE_CALIBRATE)
 
-
 /**
  * gcm_calibrate_manual_close_cb:
  **/
@@ -173,7 +168,7 @@ gcm_calibrate_manual_slider_changed_cb (GtkRange *range, GcmCalibrateManual *cal
 	priv->profile_green[priv->current_gamma] = green;
 	priv->profile_blue[priv->current_gamma] = blue;
 
-	egg_debug ("@%i, (%f,%f,%f)", priv->current_gamma, red, green, blue);
+	g_debug ("@%i, (%f,%f,%f)", priv->current_gamma, red, green, blue);
 out:
 	return;
 }
@@ -287,7 +282,7 @@ gcm_calibrate_manual_setup_page (GcmCalibrateManual *calibrate, guint page)
 
 		/* save default */
 		if (priv->profile_red[priv->current_gamma] > 1.0f) {
-			egg_debug ("resetting %i to %f", page, priv->midpoint);
+			g_debug ("resetting %i to %f", page, priv->midpoint);
 			priv->profile_red[priv->current_gamma] = priv->midpoint;
 			priv->profile_green[priv->current_gamma] = priv->midpoint;
 			priv->profile_blue[priv->current_gamma] = priv->midpoint;
@@ -300,7 +295,7 @@ gcm_calibrate_manual_setup_page (GcmCalibrateManual *calibrate, guint page)
 		ave = (priv->profile_red[priv->current_gamma] + priv->profile_green[priv->current_gamma] + priv->profile_blue[priv->current_gamma]) / 3.0f;
 		widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "hscale_brightness"));
 		gtk_range_set_value (GTK_RANGE(widget), ave - priv->midpoint);
-		egg_debug ("brightness compensation=%f", (ave - priv->midpoint));
+		g_debug ("brightness compensation=%f", (ave - priv->midpoint));
 
 		/* color is offset */
 		widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "hscale_red"));
@@ -318,7 +313,7 @@ gcm_calibrate_manual_setup_page (GcmCalibrateManual *calibrate, guint page)
 		priv->profile_green[priv->current_gamma] = CLAMP (priv->profile_green[priv->current_gamma], 0.0f, 1.0f);
 		priv->profile_blue[priv->current_gamma] = CLAMP (priv->profile_blue[priv->current_gamma], 0.0f, 1.0f);
 
-		egg_debug ("saving colours");
+		g_debug ("saving colours");
 		g_object_set (priv->gamma_widget,
 			      "color-light", light,
 			      "color-dark", dark,
@@ -394,7 +389,7 @@ gcm_calibrate_manual_setup_page (GcmCalibrateManual *calibrate, guint page)
 		goto out;
 	}
 
-	egg_warning ("oops - no page");
+	g_warning ("oops - no page");
 out:
 	if (string_title != NULL)
 		g_string_free (string_title, TRUE);
@@ -461,8 +456,8 @@ gcm_calibrate_manual_apply_cb (GtkWidget *widget, GcmCalibrateManual *calibrate)
 
 	guint i;
 	for (i=0; i<priv->calibration_steps; i++)
-		egg_debug ("@%i, %f, %f, %f", i, priv->profile_red[i], priv->profile_green[i], priv->profile_blue[i]);
-	egg_warning ("NOP: need to create profile with lcms!");
+		g_debug ("@%i, %f, %f, %f", i, priv->profile_red[i], priv->profile_green[i], priv->profile_blue[i]);
+	g_warning ("NOP: need to create profile with lcms!");
 	priv->ret = TRUE;
 
 	/* we're done */
@@ -481,7 +476,7 @@ gcm_calibrate_manual_display (GcmCalibrate *calibrate_, GtkWindow *window, GErro
 	guint i;
 	GcmCalibrateManual *calibrate = GCM_CALIBRATE_MANUAL(calibrate_);
 	GcmCalibrateManualPrivate *priv = calibrate->priv;
-	egg_debug ("calibrate_display in %i steps", priv->calibration_steps);
+	g_debug ("calibrate_display in %i steps", priv->calibration_steps);
 
 	/* save error, which can be NULL */
 	priv->error = error;
@@ -603,7 +598,7 @@ gcm_calibrate_manual_init (GcmCalibrateManual *calibrate)
 	priv->builder = gtk_builder_new ();
 	retval = gtk_builder_add_from_file (priv->builder, GCM_DATA "/gcm-calibrate.ui", &error);
 	if (retval == 0) {
-		egg_error ("failed to load ui: %s", error->message);
+		g_error ("failed to load ui: %s", error->message);
 		g_error_free (error);
 	}
 
diff --git a/src/gcm-calibrate-native.c b/src/gcm-calibrate-native.c
index 7471349..84ae0c0 100644
--- a/src/gcm-calibrate-native.c
+++ b/src/gcm-calibrate-native.c
@@ -39,8 +39,6 @@
 #include "gcm-calibrate-dialog.h"
 #include "gcm-sample-window.h"
 
-#include "egg-debug.h"
-
 static void     gcm_calibrate_native_finalize	(GObject     *object);
 
 #define GCM_CALIBRATE_NATIVE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_CALIBRATE_NATIVE, GcmCalibrateNativePrivate))
@@ -404,7 +402,7 @@ gcm_calibrate_native_create_profile_from_it8 (GcmProfile *profile, const gchar *
 	/* get the whitepoint */
 	gcm_calibrate_native_get_it8_patch_xyY (it8_handle, "DMAX", &whitepoint);
 	cmsTempFromWhitePoint (&temperature, &whitepoint);
-	egg_debug ("native whitepoint=%f,%f [scale:%f] (%fK)", whitepoint.x, whitepoint.y, whitepoint.Y, temperature);
+	g_debug ("native whitepoint=%f,%f [scale:%f] (%fK)", whitepoint.x, whitepoint.y, whitepoint.Y, temperature);
 
 	/* we need to scale each reading by this value */
 	whitepointY = whitepoint.Y;
@@ -427,7 +425,7 @@ gcm_calibrate_native_create_profile_from_it8 (GcmProfile *profile, const gchar *
 	gcm_calibrate_native_get_it8_patch_xyY (it8_handle, "CGR", &primaries.Green);
 	gcm_calibrate_native_get_it8_patch_xyY (it8_handle, "CBL", &primaries.Blue);
 
-	egg_debug ("red=%f,%f green=%f,%f blue=%f,%f",
+	g_debug ("red=%f,%f green=%f,%f blue=%f,%f",
 		   primaries.Red.x, primaries.Red.y,
 		   primaries.Green.x, primaries.Green.y,
 		   primaries.Blue.x, primaries.Blue.y);
@@ -468,7 +466,7 @@ gcm_calibrate_native_create_profile_from_it8 (GcmProfile *profile, const gchar *
 		g_set_error_literal (error, 1, 0, "no gray ramp found");
 		goto out;
 	}
-	egg_debug ("rampsize = %i", rampsize);
+	g_debug ("rampsize = %i", rampsize);
 
 	/* create arrays for the sampled and processed data */
 	for (j=0; j<3; j++) {
@@ -486,7 +484,7 @@ gcm_calibrate_native_create_profile_from_it8 (GcmProfile *profile, const gchar *
 		_gcm_color_scale_XYZ (&patch_xyz, whitepointY);
 
 		cmsDoTransform (conversion_transform, &patch_xyz, &actual_rgb, 1);
-		egg_debug ("%s = %f,%f,%f -> %f,%f,%f", patch_name,
+		g_debug ("%s = %f,%f,%f -> %f,%f,%f", patch_name,
 			   patch_rgb.R, patch_rgb.G, patch_rgb.B,
 			   actual_rgb.R, actual_rgb.G, actual_rgb.B);
 
@@ -497,7 +495,7 @@ gcm_calibrate_native_create_profile_from_it8 (GcmProfile *profile, const gchar *
 	}
 
 	for (i=0; i<rampsize; i++) {
-		egg_debug ("%i, %f,%f,%f", i,
+		g_debug ("%i, %f,%f,%f", i,
 			   data_sampled[0][i],
 			   data_sampled[1][i],
 			   data_sampled[2][i]);
@@ -526,7 +524,7 @@ gcm_calibrate_native_create_profile_from_it8 (GcmProfile *profile, const gchar *
 		data_sampled[1][i] -= leakage.G;
 		data_sampled[2][i] -= leakage.B;
 	}
-	egg_debug ("removed backlight leakage = %f,%f,%f", leakage.R, leakage.G, leakage.B);
+	g_debug ("removed backlight leakage = %f,%f,%f", leakage.R, leakage.G, leakage.B);
 
 	/* scale all values to 1.0 */
 	gcm_color_set_RGB (&scale, 0.0, 0.0, 0.0);
@@ -543,17 +541,17 @@ gcm_calibrate_native_create_profile_from_it8 (GcmProfile *profile, const gchar *
 		data_sampled[1][i] /= scale.G;
 		data_sampled[2][i] /= scale.B;
 	}
-	egg_debug ("scaled to 1.0 using = %f,%f,%f", scale.R, scale.G, scale.B);
+	g_debug ("scaled to 1.0 using = %f,%f,%f", scale.R, scale.G, scale.B);
 
 	for (i=0; i<rampsize; i++) {
-		egg_debug ("%i, %f,%f,%f", i,
+		g_debug ("%i, %f,%f,%f", i,
 			   data_sampled[0][i],
 			   data_sampled[1][i],
 			   data_sampled[2][i]);
 	}
 
 	for (i=0; i<rampsize; i++) {
-		egg_debug ("%i, %f,%f,%f", i,
+		g_debug ("%i, %f,%f,%f", i,
 			   data_sampled[0][i],
 			   data_sampled[1][i],
 			   data_sampled[2][i]);
@@ -642,7 +640,7 @@ gcm_calibrate_native_display (GcmCalibrate *calibrate, GtkWindow *window, GError
 	device.D_value  = 1.0;		/* Complete adaptation */
 
 	int PCSType = PT_Lab;
-	egg_warning ("%i", PCSType);
+	g_warning ("%i", PCSType);
 
 	cmsSaveProfileToFile (profile, "dave.icc");
 #endif
@@ -669,7 +667,7 @@ gcm_calibrate_native_display (GcmCalibrate *calibrate, GtkWindow *window, GError
 	}
 
 	/* block for a response */
-	egg_debug ("blocking waiting for user input: %s", title);
+	g_debug ("blocking waiting for user input: %s", title);
 
 	/* push new messages into the UI */
 	gcm_calibrate_dialog_show (priv->calibrate_dialog, GCM_CALIBRATE_DIALOG_TAB_GENERIC, title, message);
@@ -720,7 +718,7 @@ gcm_calibrate_native_display (GcmCalibrate *calibrate, GtkWindow *window, GError
 	else if (precision == GCM_CALIBRATE_PRECISION_LONG)
 		steps = 30;
 
-	egg_debug ("creating %s", filename_it8);
+	g_debug ("creating %s", filename_it8);
 	gcm_calibrate_native_create_it8_file (calibrate_native, sensor, filename_it8, 10);
 
 	/* get profile text data */
@@ -744,7 +742,7 @@ gcm_calibrate_native_display (GcmCalibrate *calibrate, GtkWindow *window, GError
 		goto out;
 
 	/* save */
-	egg_debug ("saving %s", filename_icc);
+	g_debug ("saving %s", filename_icc);
 	ret = gcm_profile_save (profile, filename_icc, error);
 	if (!ret)
 		goto out;
diff --git a/src/gcm-calibrate.c b/src/gcm-calibrate.c
index bc3688a..a8d62db 100644
--- a/src/gcm-calibrate.c
+++ b/src/gcm-calibrate.c
@@ -41,8 +41,6 @@
 #include "gcm-calibrate-dialog.h"
 #include "gcm-exif.h"
 
-#include "egg-debug.h"
-
 static void     gcm_calibrate_finalize	(GObject     *object);
 
 #define GCM_CALIBRATE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_CALIBRATE, GcmCalibratePrivate))
@@ -502,7 +500,6 @@ gcm_calibrate_set_working_path (GcmCalibrate *calibrate, GError **error)
 	return ret;
 }
 
-
 /**
  * gcm_calibrate_get_precision:
  **/
@@ -723,7 +720,7 @@ gcm_calibrate_display (GcmCalibrate *calibrate, GtkWindow *window, GError **erro
 		/* get the old brightness so we can restore state */
 		ret = gcm_brightness_get_percentage (brightness, &percentage, &error_tmp);
 		if (!ret) {
-			egg_warning ("failed to get brightness: %s", error_tmp->message);
+			g_warning ("failed to get brightness: %s", error_tmp->message);
 			g_error_free (error_tmp);
 			/* not fatal */
 			error_tmp = NULL;
@@ -732,7 +729,7 @@ gcm_calibrate_display (GcmCalibrate *calibrate, GtkWindow *window, GError **erro
 		/* set the new brightness */
 		ret = gcm_brightness_set_percentage (brightness, 100, &error_tmp);
 		if (!ret) {
-			egg_warning ("failed to set brightness: %s", error_tmp->message);
+			g_warning ("failed to set brightness: %s", error_tmp->message);
 			g_error_free (error_tmp);
 			/* not fatal */
 			error_tmp = NULL;
@@ -747,7 +744,7 @@ out:
 		/* set the new brightness */
 		ret_tmp = gcm_brightness_set_percentage (brightness, percentage, &error_tmp);
 		if (!ret_tmp) {
-			egg_warning ("failed to restore brightness: %s", error_tmp->message);
+			g_warning ("failed to restore brightness: %s", error_tmp->message);
 			g_error_free (error_tmp);
 			/* not fatal */
 			error = NULL;
@@ -762,7 +759,6 @@ out:
 	return ret;
 }
 
-
 /**
  * gcm_calibrate_device_get_reference_image:
  **/
@@ -878,7 +874,7 @@ gcm_calibrate_get_device_for_it8_file (const gchar *filename)
 	/* get contents */
 	ret = g_file_get_contents (filename, &contents, NULL, &error);
 	if (!ret) {
-		egg_warning ("failed to get contents: %s", error->message);
+		g_warning ("failed to get contents: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -1093,7 +1089,7 @@ gcm_calibrate_device (GcmCalibrate *calibrate, GtkWindow *window, GError **error
 		if (response == GTK_RESPONSE_YES)
 			has_shared_targets = gcm_utils_install_package (GCM_PREFS_PACKAGE_NAME_SHARED_COLOR_TARGETS, window);
 #else
-		egg_warning ("cannot install: this package was not compiled with --enable-packagekit");
+		g_warning ("cannot install: this package was not compiled with --enable-packagekit");
 #endif
 	}
 
@@ -1173,7 +1169,7 @@ gcm_calibrate_device (GcmCalibrate *calibrate, GtkWindow *window, GError **error
 	/* use the exif data if there is any present */
 	ret = gcm_calibrate_set_from_exif (calibrate, reference_image, NULL);
 	if (!ret)
-		egg_debug ("no EXIF data, so using device attributes");
+		g_debug ("no EXIF data, so using device attributes");
 
 	/* get reference data */
 	directory = has_shared_targets ? "/usr/share/color/targets" : "/media";
diff --git a/src/gcm-cell-renderer-profile-icon.c b/src/gcm-cell-renderer-profile-icon.c
index 2bc8ed7..2dae625 100644
--- a/src/gcm-cell-renderer-profile-icon.c
+++ b/src/gcm-cell-renderer-profile-icon.c
@@ -25,8 +25,6 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
-#include "egg-debug.h"
-
 #include "gcm-cell-renderer-profile-icon.h"
 
 enum {
diff --git a/src/gcm-cell-renderer-profile-text.c b/src/gcm-cell-renderer-profile-text.c
index 45e3df2..a0c4c98 100644
--- a/src/gcm-cell-renderer-profile-text.c
+++ b/src/gcm-cell-renderer-profile-text.c
@@ -25,8 +25,6 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
-#include "egg-debug.h"
-
 #include "gcm-cell-renderer-profile-text.h"
 
 enum {
diff --git a/src/gcm-cie-widget.c b/src/gcm-cie-widget.c
index e370209..2fe5c1a 100644
--- a/src/gcm-cie-widget.c
+++ b/src/gcm-cie-widget.c
@@ -32,8 +32,6 @@
 #include "gcm-color.h"
 #include "gcm-cie-widget.h"
 
-#include "egg-debug.h"
-
 G_DEFINE_TYPE (GcmCieWidget, gcm_cie_widget, GTK_TYPE_DRAWING_AREA);
 #define GCM_CIE_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_CIE_WIDGET, GcmCieWidgetPrivate))
 #define GCM_CIE_WIDGET_FONT "Sans 8"
diff --git a/src/gcm-client.c b/src/gcm-client.c
index 6fe0c11..6cab489 100644
--- a/src/gcm-client.c
+++ b/src/gcm-client.c
@@ -50,8 +50,6 @@
 #include "gcm-x11-screen.h"
 #include "gcm-utils.h"
 
-#include "egg-debug.h"
-
 static void     gcm_client_finalize	(GObject     *object);
 
 #define GCM_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_CLIENT, GcmClientPrivate))
@@ -125,7 +123,7 @@ gcm_client_set_loading (GcmClient *client, gboolean ret)
 {
 	client->priv->loading = ret;
 	g_object_notify (G_OBJECT (client), "loading");
-	egg_debug ("loading: %i", ret);
+	g_debug ("loading: %i", ret);
 }
 
 /**
@@ -234,7 +232,7 @@ static void
 gcm_client_device_changed_cb (GcmDevice *device, GcmClient *client)
 {
 	/* emit a signal */
-	egg_debug ("emit changed: %s", gcm_device_get_id (device));
+	g_debug ("emit changed: %s", gcm_device_get_id (device));
 	g_signal_emit (client, signals[SIGNAL_CHANGED], 0, device);
 }
 
@@ -291,7 +289,7 @@ gcm_client_remove_device_internal (GcmClient *client, GcmDevice *device, gboolea
 
 	/* emit a signal */
 	if (emit_signal) {
-		egg_debug ("emit removed: %s", device_id);
+		g_debug ("emit removed: %s", device_id);
 		g_signal_emit (client, signals[SIGNAL_REMOVED], 0, device);
 	}
 out:
@@ -318,7 +316,7 @@ gcm_client_gudev_remove (GcmClient *client, GUdevDevice *udev_device)
 	/* do we have a device that matches */
 	device = gcm_client_get_device_by_id (client, id);
 	if (device == NULL) {
-		egg_debug ("no match for %s", id);
+		g_debug ("no match for %s", id);
 		goto out;
 	}
 
@@ -329,7 +327,7 @@ gcm_client_gudev_remove (GcmClient *client, GUdevDevice *udev_device)
 	if (!gcm_device_get_saved (device)) {
 		ret = gcm_client_remove_device_internal (client, device, TRUE, &error);
 		if (!ret) {
-			egg_warning ("failed to remove: %s", error->message);
+			g_warning ("failed to remove: %s", error->message);
 			g_error_free (error);
 			goto out;
 		}
@@ -364,7 +362,7 @@ gcm_client_gudev_add (GcmClient *client, GUdevDevice *udev_device)
 	device = gcm_device_udev_new ();
 	ret = gcm_device_udev_set_from_device (device, udev_device, &error);
 	if (!ret) {
-		egg_debug ("failed to set for device: %s", error->message);
+		g_debug ("failed to set for device: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -372,7 +370,7 @@ gcm_client_gudev_add (GcmClient *client, GUdevDevice *udev_device)
 	/* add device */
 	ret = gcm_client_add_device (client, device, &error);
 	if (!ret) {
-		egg_debug ("failed to set for device: %s", error->message);
+		g_debug ("failed to set for device: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -398,18 +396,18 @@ gcm_client_sane_refresh_cb (GcmClient *client)
 	gcm_client_set_loading (client, TRUE);
 
 	/* rescan */
-	egg_debug ("rescanning sane");
+	g_debug ("rescanning sane");
 	if (client->priv->use_threads) {
 		thread = g_thread_create ((GThreadFunc) gcm_client_coldplug_devices_sane_thrd, client, FALSE, &error);
 		if (thread == NULL) {
-			egg_debug ("failed to rescan sane devices: %s", error->message);
+			g_debug ("failed to rescan sane devices: %s", error->message);
 			g_error_free (error);
 			goto out;
 		}
 	} else {
 		ret = gcm_client_coldplug_devices_sane (client, &error);
 		if (!ret) {
-			egg_debug ("failed to rescan sane devices: %s", error->message);
+			g_debug ("failed to rescan sane devices: %s", error->message);
 			g_error_free (error);
 			goto out;
 		}
@@ -437,7 +435,7 @@ gcm_client_uevent_cb (GUdevClient *gudev_client, const gchar *action, GUdevDevic
 	if (g_strcmp0 (action, "remove") == 0) {
 		ret = gcm_client_gudev_remove (client, udev_device);
 		if (ret)
-			egg_debug ("removed %s", g_udev_device_get_sysfs_path (udev_device));
+			g_debug ("removed %s", g_udev_device_get_sysfs_path (udev_device));
 
 #ifdef HAVE_SANE
 		/* we need to remove scanner devices */
@@ -471,7 +469,7 @@ gcm_client_uevent_cb (GUdevClient *gudev_client, const gchar *action, GUdevDevic
 	} else if (g_strcmp0 (action, "add") == 0) {
 		ret = gcm_client_gudev_add (client, udev_device);
 		if (ret)
-			egg_debug ("added %s", g_udev_device_get_sysfs_path (udev_device));
+			g_debug ("added %s", g_udev_device_get_sysfs_path (udev_device));
 
 #ifdef HAVE_SANE
 		/* we need to rescan scanner devices */
@@ -575,7 +573,7 @@ gcm_client_get_device_by_window_covered (gint x, gint y, gint width, gint height
 
 	/* get the coverage */
 	covered = (gfloat) (overlap_x * overlap_y) / (gfloat) (window_width * window_height);
-	egg_debug ("overlap_x=%i,overlap_y=%i,covered=%f", overlap_x, overlap_y, covered);
+	g_debug ("overlap_x=%i,overlap_y=%i,covered=%f", overlap_x, overlap_y, covered);
 out:
 	return covered;
 }
@@ -619,7 +617,7 @@ gcm_client_get_device_by_window (GcmClient *client, GdkWindow *window)
 		/* get details about the output */
 		gcm_x11_output_get_position (output, &x, &y);
 		gcm_x11_output_get_size (output, &width, &height);
-		egg_debug ("%s: %ix%i -> %ix%i (%ix%i -> %ix%i)", gcm_x11_output_get_name (output),
+		g_debug ("%s: %ix%i -> %ix%i (%ix%i -> %ix%i)", gcm_x11_output_get_name (output),
 			   x, y, x+width, y+height,
 			   window_x, window_y, window_x+window_width, window_y+window_height);
 
@@ -633,13 +631,13 @@ gcm_client_get_device_by_window (GcmClient *client, GdkWindow *window)
 
 			/* optimize */
 			if (covered > 0.99) {
-				egg_debug ("all in one window, no need to search other windows");
+				g_debug ("all in one window, no need to search other windows");
 				goto out;
 			}
 
 			/* keep looking */
 			covered_max = covered;
-			egg_debug ("personal best of %f for %s", covered, gcm_x11_output_get_name (output_best));
+			g_debug ("personal best of %f for %s", covered, gcm_x11_output_get_name (output_best));
 		}
 	}
 out:
@@ -669,7 +667,7 @@ gcm_client_xrandr_add (GcmClient *client, GcmX11Output *output)
 	/* if nothing connected then ignore */
 	ret = gcm_x11_output_get_connected (output);
 	if (!ret) {
-		egg_debug ("%s is not connected", gcm_x11_output_get_name (output));
+		g_debug ("%s is not connected", gcm_x11_output_get_name (output));
 		goto out;
 	}
 
@@ -677,7 +675,7 @@ gcm_client_xrandr_add (GcmClient *client, GcmX11Output *output)
 	device = gcm_device_xrandr_new ();
 	ret = gcm_device_xrandr_set_from_output (device, output, &error);
 	if (!ret) {
-		egg_debug ("failed to set for output: %s", error->message);
+		g_debug ("failed to set for output: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -685,7 +683,7 @@ gcm_client_xrandr_add (GcmClient *client, GcmX11Output *output)
 	/* add device */
 	ret = gcm_client_add_device (client, device, &error);
 	if (!ret) {
-		egg_debug ("failed to set for device: %s", error->message);
+		g_debug ("failed to set for device: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -743,7 +741,7 @@ gcm_client_cups_add (GcmClient *client, cups_dest_t dest)
 	device = gcm_device_cups_new ();
 	ret = gcm_device_cups_set_from_dest (device, priv->http, dest, &error);
 	if (!ret) {
-		egg_debug ("failed to set for output: %s", error->message);
+		g_debug ("failed to set for output: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -751,7 +749,7 @@ gcm_client_cups_add (GcmClient *client, cups_dest_t dest)
 	/* add device */
 	ret = gcm_client_add_device (client, device, &error);
 	if (!ret) {
-		egg_debug ("failed to set for device: %s", error->message);
+		g_debug ("failed to set for device: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -780,7 +778,7 @@ gcm_client_coldplug_devices_cups (GcmClient *client, GError **error)
 	}
 
 	num_dests = cupsGetDests2 (priv->http, &dests);
-	egg_debug ("got %i printers", num_dests);
+	g_debug ("got %i printers", num_dests);
 
 	/* get printers on the local server */
 	for (i = 0; i < num_dests; i++)
@@ -817,7 +815,7 @@ gcm_client_sane_add (GcmClient *client, const SANE_Device *sane_device)
 	device = gcm_device_sane_new ();
 	ret = gcm_device_sane_set_from_device (device, sane_device, &error);
 	if (!ret) {
-		egg_debug ("failed to set for output: %s", error->message);
+		g_debug ("failed to set for output: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -825,7 +823,7 @@ gcm_client_sane_add (GcmClient *client, const SANE_Device *sane_device)
 	/* add device */
 	ret = gcm_client_add_device (client, device, &error);
 	if (!ret) {
-		egg_debug ("failed to set for device: %s", error->message);
+		g_debug ("failed to set for device: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -868,7 +866,7 @@ gcm_client_coldplug_devices_sane (GcmClient *client, GError **error)
 
 	/* nothing */
 	if (device_list == NULL || device_list[0] == NULL) {
-		egg_debug ("no devices to add");
+		g_debug ("no devices to add");
 		goto out;
 	}
 
@@ -921,7 +919,7 @@ gcm_client_add_unconnected_device (GcmClient *client, GKeyFile *keyfile, const g
 	/* get colorspace */
 	colorspace_text = g_key_file_get_string (keyfile, id, "colorspace", NULL);
 	if (colorspace_text == NULL) {
-		egg_warning ("legacy device %s, falling back to RGB", id);
+		g_warning ("legacy device %s, falling back to RGB", id);
 		colorspace = GCM_COLORSPACE_RGB;
 	} else {
 		colorspace = gcm_colorspace_from_string (colorspace_text);
@@ -942,7 +940,7 @@ gcm_client_add_unconnected_device (GcmClient *client, GKeyFile *keyfile, const g
 		device = gcm_device_sane_new ();
 #endif
 	} else {
-		egg_warning ("device kind internal error");
+		g_warning ("device kind internal error");
 		goto out;
 	}
 
@@ -960,7 +958,7 @@ gcm_client_add_unconnected_device (GcmClient *client, GKeyFile *keyfile, const g
 	/* add device */
 	ret = gcm_client_add_device (client, device, &error);
 	if (!ret) {
-		egg_debug ("failed to set for device: %s", error->message);
+		g_debug ("failed to set for device: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -1014,7 +1012,7 @@ gcm_client_possibly_migrate_config_file (GcmClient *client)
 	dest = gcm_utils_get_default_config_location ();
 	ret = gcm_utils_mkdir_for_filename (dest, &error);
 	if (!ret) {
-		egg_warning ("failed to create new tree: %s", error->message);
+		g_warning ("failed to create new tree: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -1026,7 +1024,7 @@ gcm_client_possibly_migrate_config_file (GcmClient *client)
 		/* does the file already exist? -- i.e. the schema version was reset */
 		if (error->domain != G_IO_ERROR ||
 		    error->code != G_IO_ERROR_EXISTS) {
-			egg_warning ("failed to copy: %s", error->message);
+			g_warning ("failed to copy: %s", error->message);
 			g_error_free (error);
 			goto out;
 		}
@@ -1065,7 +1063,7 @@ gcm_client_add_saved (GcmClient *client, GError **error)
 
 	/* get the config file */
 	filename = gcm_utils_get_default_config_location ();
-	egg_debug ("using %s", filename);
+	g_debug ("using %s", filename);
 
 	/* load the config file */
 	keyfile = g_key_file_new ();
@@ -1091,10 +1089,10 @@ gcm_client_add_saved (GcmClient *client, GError **error)
 	for (i=0; groups[i] != NULL; i++) {
 		device = gcm_client_get_device_by_id (client, groups[i]);
 		if (device == NULL) {
-			egg_debug ("not found %s", groups[i]);
+			g_debug ("not found %s", groups[i]);
 			gcm_client_add_unconnected_device (client, keyfile, groups[i]);
 		} else {
-			egg_debug ("found already added %s", groups[i]);
+			g_debug ("found already added %s", groups[i]);
 			gcm_device_set_saved (device, TRUE);
 		}
 	}
@@ -1136,7 +1134,7 @@ gcm_client_coldplug (GcmClient *client, GcmClientColdplug coldplug, GError **err
 	/* XRandR */
 	if (!coldplug || coldplug & GCM_CLIENT_COLDPLUG_XRANDR) {
 		gcm_client_add_loading (client);
-		egg_debug ("adding devices of type XRandR");
+		g_debug ("adding devices of type XRandR");
 		ret = gcm_client_coldplug_devices_xrandr (client, error);
 		if (!ret)
 			goto out;
@@ -1145,7 +1143,7 @@ gcm_client_coldplug (GcmClient *client, GcmClientColdplug coldplug, GError **err
 	/* UDEV */
 	if (!coldplug || coldplug & GCM_CLIENT_COLDPLUG_UDEV) {
 		gcm_client_add_loading (client);
-		egg_debug ("adding devices of type UDEV");
+		g_debug ("adding devices of type UDEV");
 		if (client->priv->use_threads) {
 			thread = g_thread_create ((GThreadFunc) gcm_client_coldplug_devices_udev_thrd, client, FALSE, error);
 			if (thread == NULL)
@@ -1161,7 +1159,7 @@ gcm_client_coldplug (GcmClient *client, GcmClientColdplug coldplug, GError **err
 	enable = g_settings_get_boolean (client->priv->settings, GCM_SETTINGS_ENABLE_CUPS);
 	if (enable && (!coldplug || coldplug & GCM_CLIENT_COLDPLUG_CUPS)) {
 		gcm_client_add_loading (client);
-		egg_debug ("adding devices of type CUPS");
+		g_debug ("adding devices of type CUPS");
 		if (client->priv->use_threads) {
 			thread = g_thread_create ((GThreadFunc) gcm_client_coldplug_devices_cups_thrd, client, FALSE, error);
 			if (thread == NULL)
@@ -1178,7 +1176,7 @@ gcm_client_coldplug (GcmClient *client, GcmClientColdplug coldplug, GError **err
 	enable = g_settings_get_boolean (client->priv->settings, GCM_SETTINGS_ENABLE_SANE);
 	if (enable && (!coldplug || coldplug & GCM_CLIENT_COLDPLUG_SANE)) {
 		gcm_client_add_loading (client);
-		egg_debug ("adding devices of type SANE");
+		g_debug ("adding devices of type SANE");
 		if (client->priv->use_threads) {
 			thread = g_thread_create ((GThreadFunc) gcm_client_coldplug_devices_sane_thrd, client, FALSE, error);
 			if (thread == NULL)
@@ -1206,7 +1204,7 @@ static gboolean
 gcm_client_emit_added_idle_cb (GcmClientEmitHelper *helper)
 {
 	/* emit a signal */
-	egg_debug ("emit added: %s", gcm_device_get_id (helper->device));
+	g_debug ("emit added: %s", gcm_device_get_id (helper->device));
 	g_signal_emit (helper->client, signals[SIGNAL_ADDED], 0, helper->device);
 	helper->client->priv->emit_added_id = 0;
 
@@ -1254,7 +1252,7 @@ gcm_client_add_device (GcmClient *client, GcmDevice *device, GError **error)
 	device_id = gcm_device_get_id (device);
 	device_tmp = gcm_client_get_device_by_id (client, device_id);
 	if (device_tmp != NULL) {
-		egg_debug ("already exists, copy settings and remove old device: %s", device_id);
+		g_debug ("already exists, copy settings and remove old device: %s", device_id);
 		array = gcm_device_get_profiles (device_tmp);
 		if (array != NULL) {
 			gcm_device_set_profiles (device, array);
@@ -1320,7 +1318,7 @@ gcm_client_delete_device (GcmClient *client, GcmDevice *device, GError **error)
 
 	/* get the config file */
 	filename = gcm_utils_get_default_config_location ();
-	egg_debug ("removing %s from %s", device_id, filename);
+	g_debug ("removing %s from %s", device_id, filename);
 
 	/* load the config file */
 	keyfile = g_key_file_new ();
@@ -1418,7 +1416,7 @@ gcm_client_randr_event_cb (GcmX11Screen *screen, GcmClient *client)
 	GcmX11Output *output;
 	guint i;
 
-	egg_debug ("screens may have changed");
+	g_debug ("screens may have changed");
 
 	/* replug devices */
 	outputs = gcm_x11_screen_get_outputs (screen, NULL);
diff --git a/src/gcm-device-cups.c b/src/gcm-device-cups.c
index 0a63ac8..2ef6c6e 100644
--- a/src/gcm-device-cups.c
+++ b/src/gcm-device-cups.c
@@ -29,8 +29,6 @@
 #include "gcm-enum.h"
 #include "gcm-utils.h"
 
-#include "egg-debug.h"
-
 static void     gcm_device_cups_finalize	(GObject     *object);
 
 #define GCM_DEVICE_CUPS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_DEVICE_CUPS, GcmDeviceCupsPrivate))
@@ -72,9 +70,9 @@ gcm_device_cups_set_from_dest (GcmDevice *device, http_t *http, cups_dest_t dest
 	gchar *profile_filename = NULL;
 	GcmColorspace colorspace = GCM_COLORSPACE_UNKNOWN;
 
-	egg_debug ("name: %s", dest.name);
-	egg_debug ("instance: %s", dest.instance);
-	egg_debug ("num_options: %i", dest.num_options);
+	g_debug ("name: %s", dest.name);
+	g_debug ("instance: %s", dest.instance);
+	g_debug ("num_options: %i", dest.num_options);
 
 	/* don't add Cups-PDF devices */
 	if (g_strcmp0 (dest.name, "Cups-PDF") == 0) {
@@ -84,7 +82,7 @@ gcm_device_cups_set_from_dest (GcmDevice *device, http_t *http, cups_dest_t dest
 	}
 
 	ppd_file_location = cupsGetPPD2 (http, dest.name);
-	egg_debug ("ppd_file_location=%s", ppd_file_location);
+	g_debug ("ppd_file_location=%s", ppd_file_location);
 
 	/* don't add devices without PPD */
 	if (ppd_file_location == NULL) {
@@ -134,14 +132,14 @@ gcm_device_cups_set_from_dest (GcmDevice *device, http_t *http, cups_dest_t dest
 			else if (g_strcmp0 (value, "Gray") == 0)
 				colorspace = GCM_COLORSPACE_GRAY;
 			else
-				egg_warning ("colorspace not recognized: %s", value);
+				g_warning ("colorspace not recognized: %s", value);
 		} else if (g_strcmp0 (keyword, "cupsICCProfile") == 0) {
 			/* FIXME: possibly map from http://localhost:port/profiles/dave.icc to ~/.icc/color/dave.icc */
 			profile_filename = g_strdup (value);
-			egg_warning ("remap %s?", profile_filename);
+			g_warning ("remap %s?", profile_filename);
 		}
 
-//		egg_debug ("keyword: %s, value: %s, spec: %s", keyword, value, ppd_file->attrs[i]->spec);
+//		g_debug ("keyword: %s, value: %s, spec: %s", keyword, value, ppd_file->attrs[i]->spec);
 	}
 
 	/* convert device_id 'MFG:HP;MDL:deskjet d1300 series;DES:deskjet d1300 series;' to suitable id */
@@ -228,7 +226,6 @@ gcm_device_cups_class_init (GcmDeviceCupsClass *klass)
 	object_class->get_property = gcm_device_cups_get_property;
 	object_class->set_property = gcm_device_cups_set_property;
 
-
 	/**
 	 * GcmDeviceCups:native-device:
 	 */
diff --git a/src/gcm-device-sane.c b/src/gcm-device-sane.c
index f9672f8..7e478fd 100644
--- a/src/gcm-device-sane.c
+++ b/src/gcm-device-sane.c
@@ -28,8 +28,6 @@
 #include "gcm-enum.h"
 #include "gcm-utils.h"
 
-#include "egg-debug.h"
-
 static void     gcm_device_sane_finalize	(GObject     *object);
 
 #define GCM_DEVICE_SANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_DEVICE_SANE, GcmDeviceSanePrivate))
@@ -172,10 +170,10 @@ gcm_device_sane_set_from_device (GcmDevice *device, const SANE_Device *sane_devi
 	gchar *model = NULL;
 	gchar *title = NULL;
 
-	egg_debug ("name=%s", sane_device->name);
-	egg_debug ("vendor=%s", sane_device->vendor);
-	egg_debug ("model=%s", sane_device->model);
-	egg_debug ("type=%s", sane_device->type);
+	g_debug ("name=%s", sane_device->name);
+	g_debug ("vendor=%s", sane_device->vendor);
+	g_debug ("model=%s", sane_device->model);
+	g_debug ("type=%s", sane_device->type);
 
 	/* convert device_id 'plustek:libusb:004:002' to suitable id */
 	id = g_strdup_printf ("sane_%s", sane_device->model);
@@ -291,7 +289,7 @@ gcm_device_sane_apply_device (GcmDeviceSane *device_sane, GError **error)
 	device_filename = g_strdup_printf ("%s:%s.drc", manufacturer, model);
 	g_strdelimit (device_filename, "/", '_');
 	gcm_device_sane_remove_spaces (device_filename);
-	egg_debug ("device_filename=%s", device_filename);
+	g_debug ("device_filename=%s", device_filename);
 
 	filename = g_build_filename (g_get_home_dir (), ".sane", "xsane", device_filename, NULL);
 
diff --git a/src/gcm-device-udev.c b/src/gcm-device-udev.c
index f857e30..f47629e 100644
--- a/src/gcm-device-udev.c
+++ b/src/gcm-device-udev.c
@@ -26,8 +26,6 @@
 #include "gcm-device-udev.h"
 #include "gcm-utils.h"
 
-#include "egg-debug.h"
-
 static void     gcm_device_udev_finalize	(GObject     *object);
 
 #define GCM_DEVICE_UDEV_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_DEVICE_UDEV, GcmDeviceUdevPrivate))
@@ -189,7 +187,6 @@ gcm_device_udev_class_init (GcmDeviceUdevClass *klass)
 	object_class->get_property = gcm_device_udev_get_property;
 	object_class->set_property = gcm_device_udev_set_property;
 
-
 	/**
 	 * GcmDeviceUdev:native-device:
 	 */
diff --git a/src/gcm-device-virtual.c b/src/gcm-device-virtual.c
index f37e06d..e328982 100644
--- a/src/gcm-device-virtual.c
+++ b/src/gcm-device-virtual.c
@@ -27,8 +27,6 @@
 #include "gcm-enum.h"
 #include "gcm-utils.h"
 
-#include "egg-debug.h"
-
 #define GCM_DEVICE_VIRTUAL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_DEVICE_VIRTUAL, GcmDeviceVirtualPrivate))
 
 G_DEFINE_TYPE (GcmDeviceVirtual, gcm_device_virtual, GCM_TYPE_DEVICE)
@@ -53,7 +51,7 @@ gcm_device_virtual_create_from_params (GcmDeviceVirtual *device_virtual,
 	gcm_utils_alphanum_lcase (id);
 
 	/* create the device */
-	egg_debug ("adding %s '%s'", id, title);
+	g_debug ("adding %s '%s'", id, title);
 	g_object_set (device_virtual,
 		      "connected", FALSE,
 		      "kind", device_kind,
diff --git a/src/gcm-device-xrandr.c b/src/gcm-device-xrandr.c
index d347632..1707073 100644
--- a/src/gcm-device-xrandr.c
+++ b/src/gcm-device-xrandr.c
@@ -36,8 +36,6 @@
 #include "gcm-x11-output.h"
 #include "gcm-x11-screen.h"
 
-#include "egg-debug.h"
-
 static void     gcm_device_xrandr_finalize	(GObject     *object);
 
 #define GCM_DEVICE_XRANDR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_DEVICE_XRANDR, GcmDeviceXrandrPrivate))
@@ -256,7 +254,7 @@ gcm_device_xrandr_set_from_output (GcmDevice *device, GcmX11Output *output, GErr
 
 	/* get details */
 	id = gcm_device_xrandr_get_id_for_xrandr_device (GCM_DEVICE_XRANDR(device), output);
-	egg_debug ("asking to add %s", id);
+	g_debug ("asking to add %s", id);
 
 	/* get data about the display */
 	model = gcm_edid_get_monitor_name (priv->edid);
@@ -575,7 +573,7 @@ gcm_device_xrandr_apply (GcmDevice *device, GError **error)
 		filename_systemwide = g_strdup_printf ("%s/icc/%s.icc", GCM_SYSTEM_PROFILES_DIR, id);
 		ret = g_file_test (filename_systemwide, G_FILE_TEST_EXISTS);
 		if (ret) {
-			egg_debug ("using systemwide %s as profile", filename_systemwide);
+			g_debug ("using systemwide %s as profile", filename_systemwide);
 			profile = gcm_profile_new ();
 			file = g_file_new_for_path (filename_systemwide);
 			ret = gcm_profile_parse (profile, file, error);
diff --git a/src/gcm-device.c b/src/gcm-device.c
index 5bfdb4e..4f56528 100644
--- a/src/gcm-device.c
+++ b/src/gcm-device.c
@@ -34,8 +34,6 @@
 #include "gcm-profile.h"
 #include "gcm-utils.h"
 
-#include "egg-debug.h"
-
 static void     gcm_device_finalize	(GObject     *object);
 
 #define GCM_DEVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_DEVICE, GcmDevicePrivate))
@@ -104,7 +102,7 @@ static gboolean
 gcm_device_changed_cb (GcmDevice *device)
 {
 	/* emit a signal */
-	egg_debug ("emit changed: %s", gcm_device_get_id (device));
+	g_debug ("emit changed: %s", gcm_device_get_id (device));
 	g_signal_emit (device, signals[SIGNAL_CHANGED], 0);
 	device->priv->changed_id = 0;
 	return FALSE;
@@ -193,7 +191,7 @@ gcm_device_load_from_default_profile (GcmDevice *device, GError **error)
 	profile = g_ptr_array_index (priv->profiles, 0);
 	ret = g_file_test (gcm_profile_get_filename (profile), G_FILE_TEST_EXISTS);
 	if (!ret) {
-		egg_warning ("the file was deleted and can't be loaded: %s", gcm_profile_get_filename (profile));
+		g_warning ("the file was deleted and can't be loaded: %s", gcm_profile_get_filename (profile));
 		/* this is not fatal */
 		ret = TRUE;
 		goto out;
@@ -611,7 +609,7 @@ gcm_device_set_default_profile_filename (GcmDevice *device, const gchar *profile
 	file = g_file_new_for_path (profile_filename);
 	ret = gcm_profile_parse (profile, file, &error);
 	if (!ret) {
-		egg_warning ("failed to parse: %s", error->message);
+		g_warning ("failed to parse: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -672,7 +670,6 @@ gcm_device_load (GcmDevice *device, GError **error)
 	ret = g_key_file_load_from_file (file, filename, G_KEY_FILE_NONE, &error_local);
 	if (!ret) {
 		/* not fatal */
-		egg_warning ("failed to load from file: %s", error_local->message);
 		g_error_free (error_local);
 		ret = TRUE;
 		goto out;
@@ -682,7 +679,7 @@ gcm_device_load (GcmDevice *device, GError **error)
 	ret = g_key_file_has_group (file, priv->id);
 	if (!ret) {
 		/* not fatal */
-		egg_debug ("failed to find saved parameters for %s", priv->id);
+		g_debug ("failed to find saved parameters for %s", priv->id);
 		ret = TRUE;
 		goto out;
 	}
@@ -703,7 +700,7 @@ gcm_device_load (GcmDevice *device, GError **error)
 			if (ret) {
 				g_ptr_array_add (priv->profiles, g_object_ref (profile));
 			} else {
-				egg_warning ("failed to parse %s: %s", profile_filenames[i], error_local->message);
+				g_warning ("failed to parse %s: %s", profile_filenames[i], error_local->message);
 				g_clear_error (&error_local);
 			}
 			g_object_unref (profile);
@@ -738,7 +735,7 @@ gcm_device_load (GcmDevice *device, GError **error)
 	if (iso_date != NULL) {
 		ret = g_time_val_from_iso8601 (iso_date, &timeval);
 		if (!ret) {
-			egg_warning ("failed to parse: %s", iso_date);
+			g_warning ("failed to parse: %s", iso_date);
 			g_get_current_time (&timeval);
 		}
 	} else {
@@ -762,7 +759,7 @@ gcm_device_load (GcmDevice *device, GError **error)
 	if (!ret) {
 
 		/* just print a warning, this is not fatal */
-		egg_warning ("failed to load profile %s", error_local->message);
+		g_warning ("failed to load profile %s", error_local->message);
 		g_error_free (error_local);
 
 		/* recover as the file might have been corrupted */
@@ -979,7 +976,7 @@ gcm_device_apply (GcmDevice *device, GError **error)
 
 	/* no support */
 	if (klass->apply == NULL) {
-		egg_debug ("no klass support for %s", device->priv->id);
+		g_debug ("no klass support for %s", device->priv->id);
 		goto out;
 	}
 
diff --git a/src/gcm-exif.c b/src/gcm-exif.c
index a72619f..1fe862e 100644
--- a/src/gcm-exif.c
+++ b/src/gcm-exif.c
@@ -35,8 +35,6 @@
 
 #include "gcm-exif.h"
 
-#include "egg-debug.h"
-
 static void     gcm_exif_finalize	(GObject     *object);
 
 #define GCM_EXIF_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_EXIF, GcmExifPrivate))
diff --git a/src/gcm-gamma-widget.c b/src/gcm-gamma-widget.c
index 9bb0b56..c175fdb 100644
--- a/src/gcm-gamma-widget.c
+++ b/src/gcm-gamma-widget.c
@@ -27,8 +27,6 @@
 
 #include "gcm-gamma-widget.h"
 
-#include "egg-debug.h"
-
 G_DEFINE_TYPE (GcmGammaWidget, gcm_gamma_widget, GTK_TYPE_DRAWING_AREA);
 #define GCM_GAMMA_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_GAMMA_WIDGET, GcmGammaWidgetPrivate))
 
diff --git a/src/gcm-import.c b/src/gcm-import.c
index 5a3a027..5c3cfe9 100644
--- a/src/gcm-import.c
+++ b/src/gcm-import.c
@@ -26,13 +26,12 @@
 #include <math.h>
 #include <locale.h>
 
-#include "egg-debug.h"
-
 #include "gcm-profile.h"
 #include "gcm-profile-store.h"
 #include "gcm-utils.h"
 #include "gcm-color.h"
 #include "gcm-cie-widget.h"
+#include "gcm-debug.h"
 
 /**
  * gcm_import_add_cie_widget:
@@ -93,7 +92,7 @@ main (int argc, char **argv)
 
 	context = g_option_context_new ("gnome-color-manager import program");
 	g_option_context_add_main_entries (context, options, NULL);
-	g_option_context_add_group (context, egg_debug_get_option_group ());
+	g_option_context_add_group (context, gcm_debug_get_option_group ());
 	g_option_context_add_group (context, gtk_get_option_group (TRUE));
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
diff --git a/src/gcm-inspect.c b/src/gcm-inspect.c
index a399ba9..b9250c7 100644
--- a/src/gcm-inspect.c
+++ b/src/gcm-inspect.c
@@ -25,12 +25,11 @@
 #include <gtk/gtk.h>
 #include <locale.h>
 
-#include "egg-debug.h"
-
 #include "gcm-utils.h"
 #include "gcm-profile.h"
 #include "gcm-x11-output.h"
 #include "gcm-x11-screen.h"
+#include "gcm-debug.h"
 
 /**
  * gcm_inspect_print_data_info:
@@ -46,7 +45,7 @@ gcm_inspect_print_data_info (const gchar *title, const guint8 *data, gsize lengt
 	profile = gcm_profile_new ();
 	ret = gcm_profile_parse_data (profile, data, length, &error);
 	if (!ret) {
-		egg_warning ("failed to parse data: %s", error->message);
+		g_warning ("failed to parse data: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -89,7 +88,7 @@ gcm_inspect_show_x11_atoms (void)
 	screen = gcm_x11_screen_new ();
 	ret = gcm_x11_screen_assign (screen, NULL, &error);
 	if (!ret) {
-		egg_warning ("failed to get outputs: %s", error->message);
+		g_warning ("failed to get outputs: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -97,7 +96,7 @@ gcm_inspect_show_x11_atoms (void)
 	/* get profile from XServer */
 	ret = gcm_x11_screen_get_profile_data (screen, &data, &length, &error);
 	if (!ret) {
-		egg_warning ("failed to get XServer profile data: %s", error->message);
+		g_warning ("failed to get XServer profile data: %s", error->message);
 		g_error_free (error);
 		/* non-fatal */
 		error = NULL;
@@ -109,7 +108,7 @@ gcm_inspect_show_x11_atoms (void)
 	/* get profile from XServer */
 	ret = gcm_x11_screen_get_protocol_version (screen, &major, &minor, &error);
 	if (!ret) {
-		egg_warning ("failed to get XServer protocol version: %s", error->message);
+		g_warning ("failed to get XServer protocol version: %s", error->message);
 		g_error_free (error);
 		/* non-fatal */
 		error = NULL;
@@ -122,7 +121,7 @@ gcm_inspect_show_x11_atoms (void)
 	outputs = gcm_x11_screen_get_outputs (screen, &error);
 	if (outputs == NULL) {
 		ret = FALSE;
-		egg_warning ("failed to get outputs: %s", error->message);
+		g_warning ("failed to get outputs: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -136,7 +135,7 @@ gcm_inspect_show_x11_atoms (void)
 		/* get profile from XServer */
 		ret = gcm_x11_output_get_profile_data (output, &data_tmp, &length, &error);
 		if (!ret) {
-			egg_warning ("failed to get output profile data: %s", error->message);
+			g_warning ("failed to get output profile data: %s", error->message);
 			/* TRANSLATORS: this is when the profile has not been set */
 			g_print ("%s %s\n", title, _("not set"));
 			g_error_free (error);
@@ -602,7 +601,7 @@ main (int argc, char **argv)
 	/* TRANSLATORS: just dumps the EDID to disk */
 	context = g_option_context_new (_("EDID inspect program"));
 	g_option_context_add_main_entries (context, options, NULL);
-	g_option_context_add_group (context, egg_debug_get_option_group ());
+	g_option_context_add_group (context, gcm_debug_get_option_group ());
 	g_option_context_add_group (context, gtk_get_option_group (TRUE));
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
diff --git a/src/gcm-picker.c b/src/gcm-picker.c
index 9e53b86..2bd2231 100644
--- a/src/gcm-picker.c
+++ b/src/gcm-picker.c
@@ -30,13 +30,12 @@
 #include <gtk/gtk.h>
 #include <lcms2.h>
 
-#include "egg-debug.h"
-
 #include "gcm-calibrate-argyll.h"
 #include "gcm-sensor-client.h"
 #include "gcm-profile-store.h"
 #include "gcm-utils.h"
 #include "gcm-color.h"
+#include "gcm-debug.h"
 
 static GtkBuilder *builder = NULL;
 static GtkWidget *info_bar_hardware = NULL;
@@ -236,7 +235,7 @@ gcm_picker_measure_cb (GtkWidget *widget, gpointer data)
 		/* sample color */
 		ret = gcm_sensor_sample (sensor, NULL, &last_sample, &error);
 		if (!ret) {
-			egg_warning ("failed to measure: %s", error->message);
+			g_warning ("failed to measure: %s", error->message);
 			g_error_free (error);
 			goto out;
 		}
@@ -247,7 +246,7 @@ gcm_picker_measure_cb (GtkWidget *widget, gpointer data)
 		window = GTK_WINDOW (gtk_builder_get_object (builder, "dialog_picker"));
 		ret = gcm_calibrate_spotread (calibrate, window, &error);
 		if (!ret) {
-			egg_warning ("failed to get spot color: %s", error->message);
+			g_warning ("failed to get spot color: %s", error->message);
 			g_error_free (error);
 			goto out;
 		}
@@ -386,7 +385,7 @@ gcm_window_set_parent_xid (GtkWindow *window, guint32 xid)
 static void
 gcm_picker_error_cb (cmsContext ContextID, cmsUInt32Number errorcode, const char *text)
 {
-	egg_warning ("LCMS error %i: %s", errorcode, text);
+	g_warning ("LCMS error %i: %s", errorcode, text);
 }
 
 /**
@@ -414,7 +413,7 @@ gcm_prefs_space_combo_changed_cb (GtkWidget *widget, gpointer data)
 		goto out;
 
 	profile_filename = gcm_profile_get_filename (profile);
-	egg_debug ("changed picker space %s", profile_filename);
+	g_debug ("changed picker space %s", profile_filename);
 
 	gcm_picker_refresh_results ();
 out:
@@ -462,7 +461,6 @@ gcm_prefs_combobox_add_profile (GtkWidget *widget, GcmProfile *profile, GtkTreeI
 	if (iter == NULL)
 		iter = &iter_tmp;
 
-
 	/* also add profile */
 	model = gtk_combo_box_get_model (GTK_COMBO_BOX(widget));
 	description = gcm_profile_get_description (profile);
@@ -562,7 +560,7 @@ main (int argc, char *argv[])
 	context = g_option_context_new (NULL);
 	/* TRANSLATORS: tool that is used to pick colors */
 	g_option_context_set_summary (context, _("GNOME Color Manager Color Picker"));
-	g_option_context_add_group (context, egg_debug_get_option_group ());
+	g_option_context_add_group (context, gcm_debug_get_option_group ());
 	g_option_context_add_group (context, gtk_get_option_group (TRUE));
 	g_option_context_add_main_entries (context, options, NULL);
 	g_option_context_parse (context, &argc, &argv, NULL);
@@ -575,7 +573,7 @@ main (int argc, char *argv[])
 	builder = gtk_builder_new ();
 	retval = gtk_builder_add_from_file (builder, GCM_DATA "/gcm-picker.ui", &error);
 	if (retval == 0) {
-		egg_warning ("failed to load ui: %s", error->message);
+		g_warning ("failed to load ui: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -614,7 +612,7 @@ main (int argc, char *argv[])
 
 	/* set the parent window if it is specified */
 	if (xid != 0) {
-		egg_debug ("Setting xid %i", xid);
+		g_debug ("Setting xid %i", xid);
 		gcm_window_set_parent_xid (GTK_WINDOW (main_window), xid);
 	}
 
diff --git a/src/gcm-print.c b/src/gcm-print.c
index 2132927..06bd321 100644
--- a/src/gcm-print.c
+++ b/src/gcm-print.c
@@ -33,8 +33,6 @@
 
 #include "gcm-print.h"
 
-#include "egg-debug.h"
-
 static void     gcm_print_finalize	(GObject     *object);
 
 #define GCM_PRINT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_PRINT, GcmPrintPrivate))
@@ -113,7 +111,7 @@ gcm_print_begin_print_cb (GtkPrintOperation *operation, GtkPrintContext *context
 	}
 
 	/* setting the page count */
-	egg_debug ("setting %i pages", task->filenames->len);
+	g_debug ("setting %i pages", task->filenames->len);
 	gtk_print_operation_set_n_pages (operation, task->filenames->len);
 out:
 	return;
@@ -157,7 +155,7 @@ gcm_print_draw_page_cb (GtkPrintOperation *operation, GtkPrintContext *context,
 
 	/* scale image to fill the page, but preserve aspect */
 	scale = MIN (width / gdk_pixbuf_get_width (pixbuf), height / gdk_pixbuf_get_height (pixbuf));
-	egg_debug ("surface=%.0fx%.0f, pixbuf=%ix%i (scale=%f)", width, height, gdk_pixbuf_get_width (pixbuf), gdk_pixbuf_get_height (pixbuf), scale);
+	g_debug ("surface=%.0fx%.0f, pixbuf=%ix%i (scale=%f)", width, height, gdk_pixbuf_get_width (pixbuf), gdk_pixbuf_get_height (pixbuf), scale);
 	cairo_scale (cr, scale, scale);
 
 	/* blit to the context */
@@ -190,12 +188,12 @@ gcm_print_status_changed_cb (GtkPrintOperation *operation, GcmPrintTask *task)
 
 	/* signal the status change */
 	status = gtk_print_operation_get_status (operation);
-	egg_debug ("emit: status-changed: %i", status);
+	g_debug ("emit: status-changed: %i", status);
 	g_signal_emit (task->print, signals[SIGNAL_STATUS_CHANGED], 0, status);
 
 	/* done? */
 	if (status == GTK_PRINT_STATUS_FINISHED) {
-		egg_debug ("printing finished");
+		g_debug ("printing finished");
 		g_idle_add ((GSourceFunc) gcm_print_loop_quit_idle_cb, task);
 	} else if (status == GTK_PRINT_STATUS_FINISHED_ABORTED) {
 		task->aborted = TRUE;
@@ -204,7 +202,7 @@ gcm_print_status_changed_cb (GtkPrintOperation *operation, GcmPrintTask *task)
 		if (task->error == NULL)
 			g_set_error (&task->error, 1, 0, "printing was aborted, and no error was set");
 
-		egg_debug ("printing aborted");
+		g_debug ("printing aborted");
 		g_idle_add ((GSourceFunc) gcm_print_loop_quit_idle_cb, task);
 	}
 }
@@ -215,7 +213,7 @@ gcm_print_status_changed_cb (GtkPrintOperation *operation, GcmPrintTask *task)
 static void
 gcm_print_done_cb (GtkPrintOperation *operation, GtkPrintOperationResult result, GcmPrintTask *task)
 {
-	egg_debug ("we're done rendering...");
+	g_debug ("we're done rendering...");
 }
 
 /**
diff --git a/src/gcm-self-test.c b/src/gcm-self-test.c
index c2b288f..e778408 100644
--- a/src/gcm-self-test.c
+++ b/src/gcm-self-test.c
@@ -30,6 +30,7 @@
 #include "gcm-calibrate-native.h"
 #include "gcm-cie-widget.h"
 #include "gcm-client.h"
+#include "gcm-debug.h"
 #include "gcm-device.h"
 #include "gcm-device-udev.h"
 #include "gcm-device-xrandr.h"
@@ -836,6 +837,9 @@ main (int argc, char **argv)
 	gtk_init (&argc, &argv);
 	g_test_init (&argc, &argv, NULL);
 
+	/* setup manually as we have no GMainContext */
+	gcm_debug_setup (g_getenv ("VERBOSE") != NULL);
+
 	g_test_add_func ("/color/client", gcm_test_client_func);
 	g_test_add_func ("/color/calibrate", gcm_test_calibrate_func);
 	g_test_add_func ("/color/exif", gcm_test_exif_func);
diff --git a/src/gcm-session.c b/src/gcm-session.c
index 9e1ad51..b89be6e 100644
--- a/src/gcm-session.c
+++ b/src/gcm-session.c
@@ -27,7 +27,6 @@
 #ifdef HAVE_NOTIFY
 #include <libnotify/notify.h>
 #endif
-#include "egg-debug.h"
 
 #include "gcm-client.h"
 #include "gcm-device-xrandr.h"
@@ -36,6 +35,7 @@
 #include "gcm-utils.h"
 #include "gcm-client.h"
 #include "gcm-profile-store.h"
+#include "gcm-debug.h"
 
 static GMainLoop *loop = NULL;
 static GSettings *settings = NULL;
@@ -58,9 +58,9 @@ gcm_session_check_idle_cb (gpointer user_data)
 
 	/* get the idle time */
 	idle = (guint) g_timer_elapsed (timer, NULL);
-	egg_debug ("we've been idle for %is", idle);
+	g_debug ("we've been idle for %is", idle);
 	if (idle > GCM_SESSION_IDLE_EXIT) {
-		egg_debug ("exiting loop as idle");
+		g_debug ("exiting loop as idle");
 		g_main_loop_quit (loop);
 		return FALSE;
 	}
@@ -85,7 +85,7 @@ gcm_session_notify_cb (NotifyNotification *notification, gchar *action, gpointer
 	} else if (g_strcmp0 (action, "recalibrate") == 0) {
 		ret = g_spawn_command_line_async ("gcm-prefs", &error);
 		if (!ret) {
-			egg_warning ("failed to spawn: %s", error->message);
+			g_warning ("failed to spawn: %s", error->message);
 			g_error_free (error);
 		}
 	}
@@ -115,7 +115,7 @@ gcm_session_notify_recalibrate (const gchar *title, const gchar *message, GcmDev
 
 	ret = notify_notification_show (notification, &error);
 	if (!ret) {
-		egg_warning ("failed to show notification: %s", error->message);
+		g_warning ("failed to show notification: %s", error->message);
 		g_error_free (error);
 	}
 	return ret;
@@ -185,14 +185,14 @@ gcm_session_added_cb (GcmClient *client_, GcmDevice *device, gpointer user_data)
 	/* ensure we have a profile */
 	profile = gcm_device_get_default_profile_filename (device);
 	if (profile == NULL) {
-		egg_debug ("no profile set for %s", gcm_device_get_id (device));
+		g_debug ("no profile set for %s", gcm_device_get_id (device));
 		goto out;
 	}
 
 	/* ensure it's a profile generated by us */
 	basename = g_path_get_basename (profile);
 	if (!g_str_has_prefix (basename, "GCM")) {
-		egg_debug ("not a GCM profile for %s: %s", gcm_device_get_id (device), profile);
+		g_debug ("not a GCM profile for %s: %s", gcm_device_get_id (device), profile);
 		goto out;
 	}
 
@@ -217,7 +217,7 @@ gcm_session_get_profile_for_window (guint xid, GError **error)
 	GdkWindow *window;
 	const gchar *filename = NULL;
 
-	egg_debug ("getting profile for %i", xid);
+	g_debug ("getting profile for %i", xid);
 
 	/* get window for xid */
 	window = gdk_window_foreign_new (xid);
@@ -323,7 +323,7 @@ gcm_session_get_profiles_for_file (const gchar *filename, GError **error)
 		goto out;
 
 	/* get list */
-	egg_debug ("query=%s", filename);
+	g_debug ("query=%s", filename);
 	array_devices = gcm_client_get_devices (client);
 	for (i=0; i<array_devices->len; i++) {
 		device = g_ptr_array_index (array_devices, i);
@@ -377,7 +377,7 @@ gcm_session_get_profiles_for_device (const gchar *device_id_with_prefix, GError
 		use_native_device = TRUE;
 
 	/* get list */
-	egg_debug ("query=%s [%s] %i", device_id_with_prefix, device_id, use_native_device);
+	g_debug ("query=%s [%s] %i", device_id_with_prefix, device_id, use_native_device);
 	array_devices = gcm_client_get_devices (client);
 	for (i=0; i<array_devices->len; i++) {
 		device = g_ptr_array_index (array_devices, i);
@@ -394,7 +394,7 @@ gcm_session_get_profiles_for_device (const gchar *device_id_with_prefix, GError
 			continue;
 
 		/* compare what we have against what we were given */
-		egg_debug ("comparing %s with %s", device_id_tmp, device_id);
+		g_debug ("comparing %s with %s", device_id_tmp, device_id);
 		if (g_strcmp0 (device_id_tmp, device_id) == 0) {
 			array = gcm_device_get_profiles (device);
 			break;
@@ -628,7 +628,7 @@ gcm_session_on_bus_acquired (GDBusConnection *connection_, const gchar *name, gp
 static void
 gcm_session_on_name_acquired (GDBusConnection *connection_, const gchar *name, gpointer user_data)
 {
-	egg_debug ("acquired name: %s", name);
+	g_debug ("acquired name: %s", name);
 	connection = g_object_ref (connection_);
 }
 
@@ -638,7 +638,7 @@ gcm_session_on_name_acquired (GDBusConnection *connection_, const gchar *name, g
 static void
 gcm_session_on_name_lost (GDBusConnection *connection_, const gchar *name, gpointer user_data)
 {
-	egg_debug ("lost name: %s", name);
+	g_debug ("lost name: %s", name);
 	g_main_loop_quit (loop);
 }
 
@@ -664,7 +664,7 @@ gcm_session_emit_changed (void)
 					     NULL,
 					     &error);
 	if (!ret) {
-		egg_warning ("failed to emit signal: %s", error->message);
+		g_warning ("failed to emit signal: %s", error->message);
 		g_error_free (error);
 	}
 }
@@ -726,7 +726,7 @@ main (int argc, char *argv[])
 	context = g_option_context_new (NULL);
 	g_option_context_set_summary (context, _("Color Management D-Bus Service"));
 	g_option_context_add_main_entries (context, options, NULL);
-	g_option_context_add_group (context, egg_debug_get_option_group ());
+	g_option_context_add_group (context, gcm_debug_get_option_group ());
 	g_option_context_add_group (context, gtk_get_option_group (TRUE));
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
@@ -759,7 +759,7 @@ main (int argc, char *argv[])
 	/* get all connected devices */
 	ret = gcm_client_coldplug (client, GCM_CLIENT_COLDPLUG_ALL, &error);
 	if (!ret) {
-		egg_warning ("failed to coldplug: %s", error->message);
+		g_warning ("failed to coldplug: %s", error->message);
 		g_error_free (error);
 	}
 
@@ -770,7 +770,7 @@ main (int argc, char *argv[])
 	file = g_file_new_for_path (DATADIR "/dbus-1/interfaces/org.gnome.ColorManager.xml");
 	ret = g_file_load_contents (file, NULL, &introspection_data, NULL, NULL, &error);
 	if (!ret) {
-		egg_warning ("failed to load introspection: %s", error->message);
+		g_warning ("failed to load introspection: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -778,7 +778,7 @@ main (int argc, char *argv[])
 	/* build introspection from XML */
 	introspection = g_dbus_node_info_new_for_xml (introspection_data, &error);
 	if (introspection == NULL) {
-		egg_warning ("failed to load introspection: %s", error->message);
+		g_warning ("failed to load introspection: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
diff --git a/src/gcm-trc-widget.c b/src/gcm-trc-widget.c
index 59f4886..88baa89 100644
--- a/src/gcm-trc-widget.c
+++ b/src/gcm-trc-widget.c
@@ -29,8 +29,6 @@
 #include "gcm-profile.h"
 #include "gcm-trc-widget.h"
 
-#include "egg-debug.h"
-
 G_DEFINE_TYPE (GcmTrcWidget, gcm_trc_widget, GTK_TYPE_DRAWING_AREA);
 #define GCM_TRC_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_TRC_WIDGET, GcmTrcWidgetPrivate))
 #define GCM_TRC_WIDGET_FONT "Sans 8"
diff --git a/src/gcm-utils.c b/src/gcm-utils.c
index 1e6398d..3f03264 100644
--- a/src/gcm-utils.c
+++ b/src/gcm-utils.c
@@ -27,8 +27,6 @@
 
 #include "gcm-utils.h"
 
-#include "egg-debug.h"
-
 #define PK_DBUS_SERVICE					"org.freedesktop.PackageKit"
 #define PK_DBUS_PATH					"/org/freedesktop/PackageKit"
 #define PK_DBUS_INTERFACE_QUERY				"org.freedesktop.PackageKit.Query"
@@ -106,7 +104,7 @@ gcm_utils_is_icc_profile (GFile *file)
 			goto out;
 		}
 	} else {
-		egg_warning ("failed to get content type of %s: %s", filename, error->message);
+		g_warning ("failed to get content type of %s: %s", filename, error->message);
 		g_error_free (error);
 	}
 
@@ -152,7 +150,7 @@ gcm_utils_install_package (const gchar *package_name, GtkWindow *window)
 	g_return_val_if_fail (package_name != NULL, FALSE);
 
 #ifndef HAVE_PACKAGEKIT
-	egg_warning ("cannot install %s: this package was not compiled with --enable-packagekit", package_name);
+	g_warning ("cannot install %s: this package was not compiled with --enable-packagekit", package_name);
 	goto out;
 #endif
 
@@ -191,7 +189,7 @@ gcm_utils_install_package (const gchar *package_name, GtkWindow *window)
 						G_MAXINT, NULL, &error);
 	if (response == NULL) {
 		/* TRANSLATORS: the DBus method failed */
-		egg_warning ("%s %s\n", _("The request failed:"), error->message);
+		g_warning ("%s %s\n", _("The request failed:"), error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -382,7 +380,7 @@ gcm_gnome_help (const gchar *link_id)
 		uri = g_strconcat ("ghelp:gnome-color-manager?", link_id, NULL);
 	else
 		uri = g_strdup ("ghelp:gnome-color-manager");
-	egg_debug ("opening uri %s", uri);
+	g_debug ("opening uri %s", uri);
 
 	gtk_show_uri (NULL, uri, GDK_CURRENT_TIME, &error);
 
diff --git a/src/gcm-viewer.c b/src/gcm-viewer.c
index 8a0980f..8f5df54 100644
--- a/src/gcm-viewer.c
+++ b/src/gcm-viewer.c
@@ -27,8 +27,6 @@
 #include <locale.h>
 #include <canberra-gtk.h>
 
-#include "egg-debug.h"
-
 #include "gcm-cell-renderer-profile-text.h"
 #include "gcm-calibrate-argyll.h"
 #include "gcm-cie-widget.h"
@@ -38,6 +36,7 @@
 #include "gcm-trc-widget.h"
 #include "gcm-utils.h"
 #include "gcm-color.h"
+#include "gcm-debug.h"
 
 typedef struct {
 	GtkBuilder	*builder;
@@ -157,7 +156,7 @@ gcm_viewer_preferences_cb (GtkWidget *widget, GcmViewerPrivate *viewer)
 	GError *error = NULL;
 	ret = g_spawn_command_line_async ("gnome-control-center color", &error);
 	if (!ret) {
-		egg_warning ("failed to run prefs: %s", error->message);
+		g_warning ("failed to run prefs: %s", error->message);
 		g_error_free (error);
 	}
 }
@@ -231,7 +230,7 @@ gcm_viewer_update_profile_list (GcmViewerPrivate *viewer)
 	gchar *sort = NULL;
 	GPtrArray *profile_array = NULL;
 
-	egg_debug ("updating profile list");
+	g_debug ("updating profile list");
 
 	/* get new list */
 	profile_array = gcm_profile_store_get_array (viewer->profile_store);
@@ -251,7 +250,7 @@ gcm_viewer_update_profile_list (GcmViewerPrivate *viewer)
 					gcm_viewer_profile_get_sort_string (profile_kind),
 					description);
 		filename = gcm_profile_get_filename (profile);
-		egg_debug ("add %s to profiles list", filename);
+		g_debug ("add %s to profiles list", filename);
 		gtk_list_store_set (viewer->list_store_profiles, &iter,
 				    GCM_PROFILES_COLUMN_ID, filename,
 				    GCM_PROFILES_COLUMN_SORT, sort,
@@ -302,7 +301,7 @@ gcm_viewer_profile_delete_cb (GtkWidget *widget, GcmViewerPrivate *viewer)
 	widget = GTK_WIDGET (gtk_builder_get_object (viewer->builder, "treeview_profiles"));
 	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
 	if (!gtk_tree_selection_get_selected (selection, &model, &iter)) {
-		egg_debug ("no row selected");
+		g_debug ("no row selected");
 		goto out;
 	}
 
@@ -315,7 +314,7 @@ gcm_viewer_profile_delete_cb (GtkWidget *widget, GcmViewerPrivate *viewer)
 	file = gcm_profile_get_file (profile);
 	ret = g_file_delete (file, NULL, &error);
 	if (!ret) {
-		egg_warning ("failed to be deleted: %s", error->message);
+		g_warning ("failed to be deleted: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -392,7 +391,7 @@ gcm_viewer_profile_import_file (GcmViewerPrivate *viewer, GFile *file)
 	/* check if correct type */
 	ret = gcm_utils_is_icc_profile (file);
 	if (!ret) {
-		egg_debug ("not a ICC profile");
+		g_debug ("not a ICC profile");
 		goto out;
 	}
 
@@ -422,7 +421,7 @@ gcm_viewer_profile_import_cb (GtkWidget *widget, GcmViewerPrivate *viewer)
 	/* get new file */
 	file = gcm_viewer_file_chooser_get_icc_profile (viewer);
 	if (file == NULL) {
-		egg_warning ("failed to get filename");
+		g_warning ("failed to get filename");
 		goto out;
 	}
 
@@ -452,7 +451,7 @@ gcm_viewer_drag_data_received_cb (GtkWidget *widget, GdkDragContext *context, gi
 		goto out;
 
 	/* import this */
-	egg_debug ("dropped: %p (%s)", data, filename);
+	g_debug ("dropped: %p (%s)", data, filename);
 
 	/* split, as multiple drag targets are accepted */
 	filenames = g_strsplit_set ((const gchar *)filename, "\r\n", -1);
@@ -491,12 +490,12 @@ gcm_window_set_parent_xid (GtkWindow *window, guint32 xid)
 	display = gdk_display_get_default ();
 	parent_window = gdk_window_foreign_new_for_display (display, xid);
 	if (parent_window == NULL) {
-		egg_warning ("failed to get parent window");
+		g_warning ("failed to get parent window");
 		return;
 	}
 	our_window = gtk_widget_get_window (GTK_WIDGET (window));
 	if (our_window == NULL) {
-		egg_warning ("failed to get our window");
+		g_warning ("failed to get our window");
 		return;
 	}
 
@@ -659,7 +658,7 @@ gcm_viewer_profiles_treeview_clicked_cb (GtkTreeSelection *selection, GcmViewerP
 
 	/* This will only work in single or browse selection mode! */
 	if (!gtk_tree_selection_get_selected (selection, &model, &iter)) {
-		egg_debug ("no row selected");
+		g_debug ("no row selected");
 		return;
 	}
 
@@ -1077,7 +1076,7 @@ main (int argc, char **argv)
 
 	context = g_option_context_new ("gnome-color-manager prefs program");
 	g_option_context_add_main_entries (context, options, NULL);
-	g_option_context_add_group (context, egg_debug_get_option_group ());
+	g_option_context_add_group (context, gcm_debug_get_option_group ());
 	g_option_context_add_group (context, gtk_get_option_group (TRUE));
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
@@ -1094,7 +1093,7 @@ main (int argc, char **argv)
 	viewer->builder = gtk_builder_new ();
 	retval = gtk_builder_add_from_file (viewer->builder, GCM_DATA "/gcm-viewer.ui", &error);
 	if (retval == 0) {
-		egg_warning ("failed to load ui: %s", error->message);
+		g_warning ("failed to load ui: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -1231,7 +1230,7 @@ main (int argc, char **argv)
 
 	/* set the parent window if it is specified */
 	if (xid != 0) {
-		egg_debug ("Setting xid %i", xid);
+		g_debug ("Setting xid %i", xid);
 		gcm_window_set_parent_xid (GTK_WINDOW (main_window), xid);
 
 		/* hide the preferences button */
diff --git a/tools/Makefile.am b/tools/Makefile.am
index f7dd7d4..8a8a520 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -9,6 +9,7 @@ INCLUDES =						\
 	-DGNOME_DESKTOP_USE_UNSTABLE_API		\
 	$(GUDEV_CFLAGS)					\
 	-I$(top_srcdir)/libcolor-glib			\
+	-DG_LOG_DOMAIN=\"Gcm\"				\
 	-DLIBCOLOR_GLIB_COMPILATION			\
 	-DBINDIR=\"$(bindir)\"				\
 	-DLIBEXECDIR=\"$(libexecdir)\"			\
@@ -71,7 +72,7 @@ gcm_fix_profile_LDADD =					\
 gcm_fix_profile_CFLAGS =				\
 	$(WARNINGFLAGS_C)
 
-COLOR_GLIB_LIBS =						\
+COLOR_GLIB_LIBS =					\
 	$(top_builddir)/libcolor-glib/libcolor-glib.la
 
 gcm_ddc_util_SOURCES =					\
@@ -84,8 +85,6 @@ gcm_ddc_util_CFLAGS =					\
 	$(WARNINGFLAGS_C)
 
 gcm_sensor_example_SOURCES =				\
-	egg-debug.c					\
-	egg-debug.h					\
 	gcm-sensor-example.c
 
 gcm_sensor_example_LDADD =				\
diff --git a/tools/gcm-ddc-util.c b/tools/gcm-ddc-util.c
index 1161ffc..4bec4ef 100644
--- a/tools/gcm-ddc-util.c
+++ b/tools/gcm-ddc-util.c
@@ -166,8 +166,10 @@ main (int argc, char **argv)
 	g_type_init ();
 
 	context = g_option_context_new ("DDC/CI utility program");
-	g_option_context_set_summary (context, "This exposes the DDC/CI protocol used by most modern displays.");
 	g_option_context_add_main_entries (context, options, NULL);
+	g_option_context_set_summary (context, "This exposes the DDC/CI protocol used by most modern displays.");
+	g_option_context_add_group (context, gcm_debug_get_option_group ());
+	g_option_context_add_group (context, gtk_get_option_group (TRUE));
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
 
diff --git a/tools/gcm-dump-edid.c b/tools/gcm-dump-edid.c
index 0837a1e..58ac641 100644
--- a/tools/gcm-dump-edid.c
+++ b/tools/gcm-dump-edid.c
@@ -144,6 +144,7 @@ main (int argc, char **argv)
 
 	context = g_option_context_new ("gnome-color-manager dump edid program");
 	g_option_context_add_main_entries (context, options, NULL);
+	g_option_context_add_group (context, gcm_debug_get_option_group ());
 	g_option_context_add_group (context, gtk_get_option_group (TRUE));
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
diff --git a/tools/gcm-dump-profile.c b/tools/gcm-dump-profile.c
index d41200f..91b4df9 100644
--- a/tools/gcm-dump-profile.c
+++ b/tools/gcm-dump-profile.c
@@ -114,6 +114,7 @@ main (int argc, char **argv)
 
 	context = g_option_context_new ("ICC profile dump program");
 	g_option_context_add_main_entries (context, options, NULL);
+	g_option_context_add_group (context, gcm_debug_get_option_group ());
 	g_option_context_add_group (context, gtk_get_option_group (TRUE));
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
diff --git a/tools/gcm-dump-sensor.c b/tools/gcm-dump-sensor.c
index e1aaeea..08cce87 100644
--- a/tools/gcm-dump-sensor.c
+++ b/tools/gcm-dump-sensor.c
@@ -49,6 +49,8 @@ main (int argc, char **argv)
 	textdomain (GETTEXT_PACKAGE);
 
 	context = g_option_context_new ("ICC profile dump program");
+	g_option_context_add_group (context, gcm_debug_get_option_group ());
+	g_option_context_add_group (context, gtk_get_option_group (TRUE));
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
 
diff --git a/tools/gcm-sensor-example.c b/tools/gcm-sensor-example.c
index 082ea2d..d02c679 100644
--- a/tools/gcm-sensor-example.c
+++ b/tools/gcm-sensor-example.c
@@ -28,7 +28,6 @@
 #include <glib.h>
 #include <libcolor-glib.h>
 
-#include "egg-debug.h"
 #include "gcm-sensor-colormunki.h"
 
 /**
@@ -56,7 +55,8 @@ main (int argc, char **argv)
 	GMainLoop *loop;
 
 	context = g_option_context_new ("gnome-color-manager sensor example");
-	g_option_context_add_group (context, egg_debug_get_option_group ());
+	g_option_context_add_group (context, gcm_debug_get_option_group ());
+	g_option_context_add_group (context, gtk_get_option_group (TRUE));
 	g_option_context_parse (context, &argc, &argv, NULL);
 	g_option_context_free (context);
 
@@ -76,7 +76,7 @@ main (int argc, char **argv)
 	/* get ambient */
 	ret = gcm_sensor_get_ambient (sensor, NULL, &value, &error);
 	if (!ret) {
-		egg_warning ("failed to get ambient: %s", error->message);
+		g_warning ("failed to get ambient: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
@@ -85,7 +85,7 @@ main (int argc, char **argv)
 	/* sample color */
 	ret = gcm_sensor_sample (sensor, NULL, &values, &error);
 	if (!ret) {
-		egg_warning ("failed to measure: %s", error->message);
+		g_warning ("failed to measure: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}



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