Changeset 1134:51ce5a30df2d in freeDiameter for include
- Timestamp:
- May 15, 2013, 4:41:48 PM (11 years ago)
- Branch:
- default
- Children:
- 1135:90e0382e6579, 1137:35363aac8dd6
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/libfdproto.h
r1122 r1134 457 457 } MARK_DEPRECATED; 458 458 459 static __inline__ int TRACE_BOOL( enum old_levels level ) MARK_DEPRECATED 460 { 461 return (level <= fd_g_debug_lvl) 462 || (fd_debug_one_function && !strcmp(fd_debug_one_function, __PRETTY_FUNCTION__)) 463 || (fd_debug_one_file && !strcmp(fd_debug_one_file, __STRIPPED_FILE__) ); 459 static __inline__ int old_TRACE_BOOL( enum old_levels level, const char * file, const char * func ) MARK_DEPRECATED 460 { 461 if ((fd_debug_one_function && !strcmp(fd_debug_one_function, func)) 462 || (fd_debug_one_file && !strcmp(fd_debug_one_file, file) )) 463 return 2; /* Level override */ 464 if (level <= fd_g_debug_lvl) 465 return 1; /* Normal level */ 466 return 0; /* No trace */ 464 467 } 468 #define TRACE_BOOL(level) old_TRACE_BOOL((level), __STRIPPED_FILE__, __PRETTY_FUNCTION__) 465 469 466 470 #ifndef SWIG … … 488 492 /* old macro for traces. To be replaced by appropriate LOG_* macros. */ 489 493 # define TRACE_DEBUG(oldlevel, format,args... ) { \ 490 if (TRACE_BOOL(oldlevel)) { \ 494 int __l__; \ 495 if ((__l__ = TRACE_BOOL(oldlevel))) { \ 491 496 if (oldlevel <= NONE) { LOG_E(format,##args); } \ 492 497 else if (oldlevel <= INFO) { LOG_N(format,##args); } \ 498 else if (__l__ == 2) { LOG_N(format,##args); } \ 493 499 else if (oldlevel <= FULL) { LOG_D(format,##args); } \ 494 500 else { LOG_A(format,##args); } \
Note: See TracChangeset
for help on using the changeset viewer.