Mercurial > hg > freeDiameter
changeset 958:b415d1384e0d
Remove TRACE_LEVEL. Obsoleted by run-time support (--debug-one-file).
Ok sdecugis.
author | Thomas Klausner <tk@giga.or.at> |
---|---|
date | Thu, 28 Feb 2013 11:06:31 +0100 |
parents | d028fa6625e0 |
children | 8881967d087c |
files | extensions/_sample/CMakeLists.txt extensions/acl_wl/CMakeLists.txt extensions/app_radgw/CMakeLists.txt extensions/rt_default/CMakeLists.txt include/freeDiameter/libfdproto.h tests/CMakeLists.txt |
diffstat | 6 files changed, 2 insertions(+), 48 deletions(-) [+] |
line wrap: on
line diff
--- a/extensions/_sample/CMakeLists.txt Wed Feb 27 17:25:46 2013 +0100 +++ b/extensions/_sample/CMakeLists.txt Thu Feb 28 11:06:31 2013 +0100 @@ -1,15 +1,6 @@ # The sample extension PROJECT("Sample extension") -# Overwrite the debug level for the extension code if configured -OPTION(DEBUG_LEVEL__SAMPLE "Overwrite debug level for the extension _sample if defined (valid values: FULL, ANNOYING, CALL...)" OFF) -IF (DEBUG_LEVEL__SAMPLE) - ADD_DEFINITIONS(-DTRACE_LEVEL=${DEBUG_LEVEL__SAMPLE}) -ENDIF (DEBUG_LEVEL__SAMPLE) -IF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - MARK_AS_ADVANCED(DEBUG_LEVEL__SAMPLE) -ENDIF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - # Compile as a module FD_ADD_EXTENSION(dbg_sample sample.c hello.cpp fini.c)
--- a/extensions/acl_wl/CMakeLists.txt Wed Feb 27 17:25:46 2013 +0100 +++ b/extensions/acl_wl/CMakeLists.txt Thu Feb 28 11:06:31 2013 +0100 @@ -16,15 +16,6 @@ aw_conf.tab.h ) -# Overwrite the debug level for the extension code if configured -OPTION(DEBUG_LEVEL_ACL_WL "Overwrite debug level for the extension acl_wl if defined (valid values: FULL, ANNOYING, CALL...)" OFF) -IF (DEBUG_LEVEL_ACL_WL) - ADD_DEFINITIONS(-DTRACE_LEVEL=${DEBUG_LEVEL_ACL_WL}) -ENDIF (DEBUG_LEVEL_ACL_WL) -IF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - MARK_AS_ADVANCED(DEBUG_LEVEL_ACL_WL) -ENDIF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - # Compile as a module FD_ADD_EXTENSION(acl_wl ${ACL_WL_SRC})
--- a/extensions/app_radgw/CMakeLists.txt Wed Feb 27 17:25:46 2013 +0100 +++ b/extensions/app_radgw/CMakeLists.txt Thu Feb 28 11:06:31 2013 +0100 @@ -2,16 +2,6 @@ PROJECT("RADIUS/Diameter extensible gateway application for freeDiameter" C) -# Overwrite the debug level for the extension code if configured -OPTION(DEBUG_LEVEL_APP_RADGW "Overwrite debug level for the extension app_radgw if defined (valid values: FULL, ANNOYING, CALL...)" OFF) -IF (DEBUG_LEVEL_APP_RADGW) - ADD_DEFINITIONS(-DTRACE_LEVEL=${DEBUG_LEVEL_APP_RADGW}) -ENDIF (DEBUG_LEVEL_APP_RADGW) -IF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - MARK_AS_ADVANCED(DEBUG_LEVEL_APP_RADGW) -ENDIF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - - ########### Main app_radgw extension ############# # Parser files
--- a/extensions/rt_default/CMakeLists.txt Wed Feb 27 17:25:46 2013 +0100 +++ b/extensions/rt_default/CMakeLists.txt Thu Feb 28 11:06:31 2013 +0100 @@ -30,15 +30,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) -# Overwrite the debug level for the extension code if configured, example: cmake -DDEBUG_LEVEL_RT_DEFAULT:STATIC=CALL ... -OPTION(DEBUG_LEVEL_RT_DEFAULT "Overwrite debug level for the extension rt_default if defined (valid values: FULL, ANNOYING, CALL...)" OFF) -IF (DEBUG_LEVEL_RT_DEFAULT) - ADD_DEFINITIONS(-DTRACE_LEVEL=${DEBUG_LEVEL_RT_DEFAULT}) -ENDIF (DEBUG_LEVEL_RT_DEFAULT) -IF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - MARK_AS_ADVANCED(DEBUG_LEVEL_RT_DEFAULT) -ENDIF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - # Compile these files as a freeDiameter extension FD_ADD_EXTENSION(rt_default ${RT_DEFAULT_SRC})
--- a/include/freeDiameter/libfdproto.h Wed Feb 27 17:25:46 2013 +0100 +++ b/include/freeDiameter/libfdproto.h Thu Feb 28 11:06:31 2013 +0100 @@ -221,14 +221,6 @@ #define FCTS 6 /* Display entry parameters of most functions */ #define CALL 9 /* Display calls to most functions (with CHECK macros) */ -/* Increment the debug level for a file at compilation time by defining -DTRACE_LEVEL=FULL for example. */ -#ifndef TRACE_LEVEL -#define TRACE_LEVEL NONE -#endif /* TRACE_LEVEL */ - -/* The level of the file being compiled. */ -static int local_debug_level = TRACE_LEVEL; - /* A global level, changed by configuration or cmd line for example. Default is INFO (in libfdproto/log.c). */ extern int fd_g_debug_lvl; @@ -251,11 +243,11 @@ /* Boolean for tracing at a certain level */ #ifdef DEBUG -#define TRACE_BOOL(_level_) ( ((_level_) <= local_debug_level + fd_g_debug_lvl) \ +#define TRACE_BOOL(_level_) ( ((_level_) <= fd_g_debug_lvl) \ || (fd_debug_one_function && !strcmp(fd_debug_one_function, __PRETTY_FUNCTION__)) \ || (fd_debug_one_file && !strcmp(fd_debug_one_file, __STRIPPED_FILE__) ) ) #else /* DEBUG */ -#define TRACE_BOOL(_level_) ((_level_) <= local_debug_level + fd_g_debug_lvl) +#define TRACE_BOOL(_level_) ((_level_) <= fd_g_debug_lvl) #endif /* DEBUG */
--- a/tests/CMakeLists.txt Wed Feb 27 17:25:46 2013 +0100 +++ b/tests/CMakeLists.txt Thu Feb 28 11:06:31 2013 +0100 @@ -35,7 +35,6 @@ # Some parameters for the tests ADD_DEFINITIONS(-DTEST_DEBUG) -ADD_DEFINITIONS(-DTRACE_LEVEL=NONE) ADD_DEFINITIONS(-DBUILD_DIR="${CMAKE_BINARY_DIR}") INCLUDE_DIRECTORIES( "../libfdproto" )