handle invalid log level strings. (FSCORE-69)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6604 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2007-12-10 19:16:50 +00:00
parent 9f5241ee00
commit cc71ce69e0
12 changed files with 47 additions and 20 deletions

View File

@@ -485,6 +485,9 @@ void console_log(char *level_str, char *msg)
switch_log_level_t level = SWITCH_LOG_DEBUG;
if (level_str) {
level = switch_log_str2level(level_str);
if (level == SWITCH_LOG_INVALID) {
level = SWITCH_LOG_DEBUG;
}
}
switch_log_printf(SWITCH_CHANNEL_LOG, level, msg);
fflush(stdout); // TEMP ONLY!! SHOULD NOT BE CHECKED IN!!