Changeset 898:c2ecce3fb928 in freeDiameter
- Timestamp:
- Dec 4, 2012, 5:27:19 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/libfdproto.h
r897 r898 2247 2247 /* configure the msg_log facility */ 2248 2248 enum fd_msg_log_method { 2249 FD_MSG_LOGTO_DEBUGONLY = 0, /* Simply log the message with other debug information, at the INFO level. This is default */ 2249 FD_MSG_LOGTO_NONE = 0, /* The message is not dumped. This is the default. */ 2250 FD_MSG_LOGTO_DEBUGONLY, /* Simply log the message with other debug information, at the INFO level. */ 2250 2251 FD_MSG_LOGTO_FILE, /* Messages are dumped in a single file, defined in arg */ 2251 2252 FD_MSG_LOGTO_DIR /* Messages are dumped in different files within one directory defined in arg. */ -
libfdproto/msg_log.c
r895 r898 64 64 TRACE_ENTRY("%d %d %p", cause, method, arg); 65 65 CHECK_PARAMS( (cause >= 0) && (cause <= FD_MSG_LOG_MAX) ); 66 CHECK_PARAMS( (method >= FD_MSG_LOGTO_ DEBUGONLY) && (method <= FD_MSG_LOGTO_DIR) );67 CHECK_PARAMS( (method == FD_MSG_LOGTO_ DEBUGONLY) || (arg != NULL) );66 CHECK_PARAMS( (method >= FD_MSG_LOGTO_NONE) && (method <= FD_MSG_LOGTO_DIR) ); 67 CHECK_PARAMS( (method == FD_MSG_LOGTO_NONE) || (method == FD_MSG_LOGTO_DEBUGONLY) || (arg != NULL) ); 68 68 69 69 /* Lock the configuration */ … … 82 82 (cause == FD_MSG_LOG_RECEIVED) ? "RECEIVED" : 83 83 (cause == FD_MSG_LOG_SENT) ? "SENT" : 84 (cause == FD_MSG_LOG_NODELIVER) ? "NODELIVER" : 85 (cause == FD_MSG_LOG_TIMING) ? "TIMING" : 84 86 "???", 85 (method == FD_MSG_LOGTO_FILE) ? "file" : 87 (method == FD_MSG_LOGTO_NONE) ? "none" : 88 (method == FD_MSG_LOGTO_DEBUGONLY) ? "debug" : 89 (method == FD_MSG_LOGTO_FILE) ? "file" : 86 90 (method == FD_MSG_LOGTO_DIR) ? "directory" : 87 91 "???", … … 130 134 CHECK_POSIX_DO( pthread_mutex_unlock(&ml_conf.lock), ); 131 135 132 /* Do not log if the level is not at least INFO */ 133 if ((meth == FD_MSG_LOGTO_DEBUGONLY) && (fd_g_debug_lvl < INFO)) { 136 /* Return now when loging is not requested */ 137 if ((meth == FD_MSG_LOGTO_NONE) 138 || ((meth == FD_MSG_LOGTO_DEBUGONLY) && (fd_g_debug_lvl < INFO))) { 134 139 return; 135 140 } … … 187 192 /* And finally close the stream if needed */ 188 193 switch (meth) { 189 case FD_MSG_LOGTO_DEBUGONLY:190 break;191 192 194 case FD_MSG_LOGTO_FILE: 193 195 TODO("close?");
Note: See TracChangeset
for help on using the changeset viewer.