diff options
Diffstat (limited to 'mission-control-plugins/debug-internal.h')
-rw-r--r-- | mission-control-plugins/debug-internal.h | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/mission-control-plugins/debug-internal.h b/mission-control-plugins/debug-internal.h index ff6440c4..d150e6c7 100644 --- a/mission-control-plugins/debug-internal.h +++ b/mission-control-plugins/debug-internal.h @@ -24,31 +24,22 @@ #include "config.h" #include <glib.h> +#include <mission-control-plugins/debug.h> -G_BEGIN_DECLS - -gboolean _mcp_is_debugging (void); -void _mcp_debug (const gchar *format, ...) G_GNUC_PRINTF (1, 2); - -G_END_DECLS +#ifdef DEBUG +#undef DEBUG +#endif #ifdef ENABLE_DEBUG -#undef DEBUG #define DEBUG(format, ...) \ - _mcp_debug ("%s: " format, G_STRFUNC, ##__VA_ARGS__) + if (mcp_debugging (MCP_DEBUG_TYPE)) \ + g_debug ("%s: " format, G_STRLOC, ##__VA_ARGS__) -#undef DEBUGGING -#define DEBUGGING _mcp_is_debugging () +#else -#else /* !defined (ENABLE_DEBUG) */ - -#undef DEBUG #define DEBUG(format, ...) do {} while (0) -#undef DEBUGGING -#define DEBUGGING 0 - -#endif /* !defined (ENABLE_DEBUG) */ +#endif #endif |