From: Anthony Minessale Date: Fri, 5 Oct 2007 18:59:18 +0000 (+0000) Subject: add loglevel param to switch.conf X-Git-Tag: v1.0-beta2~543 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d484959bc9e32f5b17257921ff2ccc4c6560649f;p=thirdparty%2Ffreeswitch.git add loglevel param to switch.conf git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5822 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/conf/switch.conf.xml b/conf/switch.conf.xml index a463dc487a..0772630c00 100644 --- a/conf/switch.conf.xml +++ b/conf/switch.conf.xml @@ -4,6 +4,8 @@ + + diff --git a/src/switch_core.c b/src/switch_core.c index 1e6f095757..18718c687c 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -443,6 +443,16 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(const char *console, switch_cor if (switch_true(val)) { switch_set_flag((&runtime), SCF_CRASH_PROT); } + } else if (!strcasecmp(var, "loglevel")) { + int level; + if (*val > 47 && *val < 58) { + level = atoi(val); + } else { + level = switch_log_str2level(val); + } + + switch_core_session_ctl(SCSC_LOGLEVEL, &level); + } else if (!strcasecmp(var, "sessions-per-second")) { switch_core_sessions_per_second(atoi(val)); } else if (!strcasecmp(var, "max-sessions")) {