summaryrefslogtreecommitdiff
path: root/src/debug.h
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2007-10-17 15:28:01 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2007-10-17 15:28:01 +0000
commita87ad071174aa1c7d26cb82ab059890a3165342d (patch)
tree446e18589ea01900905009307b641618e4f7c8b1 /src/debug.h
parent91427c4d706081ed23222c6bc9d23aab45809152 (diff)
downloadtelepathy-haze-a87ad071174aa1c7d26cb82ab059890a3165342d.tar.gz
add a DEBUG macro that adds the calling function's name, and a haze_debug function wrapping g_debug
20071017152801-9f02e-400f1e72b9e0ae35a36dc0f43073bcca1cc06472.gz
Diffstat (limited to 'src/debug.h')
-rw-r--r--src/debug.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/debug.h b/src/debug.h
index 6027c78..ef3dfe4 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -1,5 +1,5 @@
/*
- * debug.h - header for haze's libpurple debug machinery
+ * debug.h - header for haze's debug machinery for itself and libpurple
* Copyright (C) 2007 Collabora Ltd.
*
* This program is free software; you can redistribute it and/or modify
@@ -19,3 +19,9 @@
*/
void haze_debug_init(void);
+
+void haze_debug (const gchar *format, ...)
+ G_GNUC_PRINTF (1,2);
+
+#define DEBUG(format, ...) \
+ haze_debug ("%s: " format, G_STRFUNC, ##__VA_ARGS__)