summaryrefslogtreecommitdiff
path: root/server/util
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-07-09 19:17:45 +0200
committerSimo Sorce <ssorce@redhat.com>2009-07-10 09:51:39 -0400
commit923bc6d7922c4374bbb70ff34fa922fe595ec40b (patch)
treefeea89ef8ccb4d94292a5aa83e1a70b6c4aac0e8 /server/util
parent40c98139e5754549d0d4deb75a604900bdbfd0e1 (diff)
downloadsssd-923bc6d7922c4374bbb70ff34fa922fe595ec40b.tar.gz
sssd-923bc6d7922c4374bbb70ff34fa922fe595ec40b.tar.bz2
sssd-923bc6d7922c4374bbb70ff34fa922fe595ec40b.zip
add a short explanation about the used debug levels
Diffstat (limited to 'server/util')
-rw-r--r--server/util/util.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/util/util.h b/server/util/util.h
index 77bafcee..fac3ea54 100644
--- a/server/util/util.h
+++ b/server/util/util.h
@@ -21,6 +21,20 @@ void debug_fn(const char *format, ...);
{"debug-level", 'd', POPT_ARG_INT, &debug_level, 0, \
"Debug level", NULL},
+/** \def DEBUG(level, body)
+ \brief macro to generate debug messages
+
+ \param level the debug level, please respect the following guidelines:
+ - 1 is for critical errors users may find it difficult to understand but
+ are still quite clear
+ - 2-4 is for stuff developers are interested in in general, but
+ shouldn't fill the screen with useless low level verbose stuff
+ - 5-6 is for errors you may want to track, but only if you explicitly
+ looking for additional clues
+ - 7-10 is for informational stuff
+
+ \param body the debug message you want to send, should end with \n
+*/
#define DEBUG(level, body) do { \
if (level <= debug_level) { \
debug_fn("[%s] [%s] (%d): ", \