summaryrefslogtreecommitdiffstats
path: root/src/util/util.h
diff options
context:
space:
mode:
authorNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>2013-12-20 16:51:37 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-02-12 22:31:13 +0100
commit5c233380e1ebf641f6106a34d7b94f9e9a606589 (patch)
tree421a41bd27f02d5cca480c0241f38feddbc7b1d4 /src/util/util.h
parentdfdc99afd56b605632adc265bfb1f55cd52b3dbe (diff)
downloadsssd-5c233380e1ebf641f6106a34d7b94f9e9a606589.tar.gz
sssd-5c233380e1ebf641f6106a34d7b94f9e9a606589.tar.xz
sssd-5c233380e1ebf641f6106a34d7b94f9e9a606589.zip
Remove DEBUG macro support for old debug levels
Remove support for specifying old debug levels to the DEBUG macro: * remove debug_get_level function which was used for conversion, * remove debug_get_level tests, * remove mentions of old/new levels from DEBUG and DEBUG_IS_SET macro descriptions, * rename "newlevel" argument of debug_fn to just "level". Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/util/util.h')
-rw-r--r--src/util/util.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/util/util.h b/src/util/util.h
index 9cc53f880..14d797480 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -68,9 +68,8 @@ extern int debug_timestamps;
extern int debug_microseconds;
extern int debug_to_file;
extern const char *debug_log_file;
-void debug_fn(const char *function, int newlevel, const char *format, ...)
+void debug_fn(const char *function, int level, const char *format, ...)
SSS_ATTRIBUTE_PRINTF(3, 4);
-int debug_get_level(int old_level);
int debug_convert_old_level(int old_level);
errno_t set_debug_file_from_fd(const int fd);
@@ -113,27 +112,18 @@ errno_t set_debug_file_from_fd(const int fd);
\brief macro to generate debug messages
\param level the debug level, please use one of the SSSDBG_* macros
- Old format:
- - 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 format the debug message format string, should result in a
newline-terminated message
\param ... the debug message format arguments
*/
#define DEBUG(level, format, ...) do { \
- int __debug_macro_newlevel = debug_get_level(level); \
- if (DEBUG_IS_SET(__debug_macro_newlevel)) \
- debug_fn(__FUNCTION__, __debug_macro_newlevel, format, ##__VA_ARGS__); \
+ int __debug_macro_level = level; \
+ if (DEBUG_IS_SET(__debug_macro_level)) \
+ debug_fn(__FUNCTION__, __debug_macro_level, format, ##__VA_ARGS__); \
} while (0)
/** \def DEBUG_IS_SET(level)
- \brief checks whether level (must be in new format) is set in debug_level
+ \brief checks whether level is set in debug_level
\param level the debug level, please use one of the SSSDBG*_ macros
*/