Index: extensions/_sample/CMakeLists.txt
===================================================================
--- extensions/_sample/CMakeLists.txt	(revision 653)
+++ extensions/_sample/CMakeLists.txt	(revision 958)
@@ -1,13 +1,4 @@
 # 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
Index: extensions/acl_wl/CMakeLists.txt
===================================================================
--- extensions/acl_wl/CMakeLists.txt	(revision 833)
+++ extensions/acl_wl/CMakeLists.txt	(revision 958)
@@ -17,13 +17,4 @@
 )
 
-# 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})
Index: extensions/app_radgw/CMakeLists.txt
===================================================================
--- extensions/app_radgw/CMakeLists.txt	(revision 845)
+++ extensions/app_radgw/CMakeLists.txt	(revision 958)
@@ -1,14 +1,4 @@
 # The app_radgw extension
 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")
 
 
Index: extensions/rt_default/CMakeLists.txt
===================================================================
--- extensions/rt_default/CMakeLists.txt	(revision 313)
+++ extensions/rt_default/CMakeLists.txt	(revision 958)
@@ -31,13 +31,4 @@
 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})
Index: include/freeDiameter/libfdproto.h
===================================================================
--- include/freeDiameter/libfdproto.h	(revision 955)
+++ include/freeDiameter/libfdproto.h	(revision 958)
@@ -222,12 +222,4 @@
 #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;
@@ -252,9 +244,9 @@
 /* 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 */
 
Index: tests/CMakeLists.txt
===================================================================
--- tests/CMakeLists.txt	(revision 878)
+++ tests/CMakeLists.txt	(revision 958)
@@ -36,5 +36,4 @@
 
 ADD_DEFINITIONS(-DTEST_DEBUG)
-ADD_DEFINITIONS(-DTRACE_LEVEL=NONE)
 ADD_DEFINITIONS(-DBUILD_DIR="${CMAKE_BINARY_DIR}")
 
