[Freeipa-devel] [PATCH] add a short explanation about the used debug levels

Sumit Bose sbose at redhat.com
Thu Jul 9 17:21:35 UTC 2009


Hi,

this patch adds a short description of the debuglevels used by sssd. I
have used a doxygen style comment to make it easy to have some nice
api-doc some time in the future.

bye,
Sumit
-------------- next part --------------
>From d40c42e44c1774553a04b80538eeb485899479f0 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose at redhat.com>
Date: Thu, 9 Jul 2009 19:17:45 +0200
Subject: [PATCH] add a short explanation about the used debug levels

---
 server/util/util.h |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/server/util/util.h b/server/util/util.h
index 77bafce..fac3ea5 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): ", \
-- 
1.6.2.5



More information about the Freeipa-devel mailing list