mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
add sofia tracelevel <level> and tracelevel param in <settings>
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13735 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -120,6 +120,19 @@ SWITCH_DECLARE(switch_log_level_t) switch_log_str2level(const char *str)
|
||||
int x = 0;
|
||||
switch_log_level_t level = SWITCH_LOG_INVALID;
|
||||
|
||||
if (switch_is_number(str)) {
|
||||
x = atoi(str);
|
||||
|
||||
if (x > SWITCH_LOG_INVALID) {
|
||||
return SWITCH_LOG_INVALID -1;
|
||||
} else if (x < 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (x = 0;; x++) {
|
||||
if (!LEVELS[x]) {
|
||||
break;
|
||||
|
Reference in New Issue
Block a user