Changeset 174:2b2f78036749 in freeDiameter
- Timestamp:
- Feb 3, 2010, 3:58:56 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
freeDiameter/main.c
r142 r174 192 192 { "quiet", no_argument, NULL, 'q' }, 193 193 { "dbglocale", optional_argument, NULL, 'l' }, 194 { "dbg_func", required_argument, NULL, 'f' }, 195 { "dbg_file", required_argument, NULL, 'F' }, 194 196 { NULL, 0, NULL, 0 } 195 197 }; … … 229 231 case 'd': /* Increase verbosity of debug messages. */ 230 232 fd_g_debug_lvl++; 233 break; 234 235 case 'f': /* Full debug for the function with this name. */ 236 fd_debug_one_function = optarg; 237 break; 238 239 case 'F': /* Full debug for the file with this name. */ 240 fd_debug_one_file = optarg; 231 241 break; 232 242 -
include/freeDiameter/libfreeDiameter.h
r168 r174 98 98 void fd_log_debug ( char * format, ... ); 99 99 extern pthread_mutex_t fd_log_lock; 100 extern char * fd_debug_one_function; 101 extern char * fd_debug_one_file; 100 102 101 103 /* … … 166 168 167 169 /* Boolean for tracing at a certain level */ 168 #define TRACE_BOOL(_level_) ( (_level_) <= local_debug_level + fd_g_debug_lvl ) 170 #define TRACE_BOOL(_level_) ( ((_level_) <= local_debug_level + fd_g_debug_lvl) \ 171 || (fd_debug_one_function && !strcmp(fd_debug_one_function, __PRETTY_FUNCTION__)) \ 172 || (fd_debug_one_file && !strcmp(fd_debug_one_file, __FILE__) ) ) 169 173 170 174 /* The general debug macro, each call results in two lines of debug messages (change the macro for more compact output) */ -
libfreeDiameter/log.c
r22 r174 41 41 pthread_key_t fd_log_thname; 42 42 int fd_g_debug_lvl = 0; 43 44 /* These may be used to pass specific debug requests via the command-line parameters */ 45 char * fd_debug_one_function = NULL; 46 char * fd_debug_one_file = NULL; 47 43 48 44 49 /* Log a debug message */
Note: See TracChangeset
for help on using the changeset viewer.