add loglevel param to switch.conf

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5822 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-10-05 18:59:18 +00:00
parent 464ba5a395
commit d484959bc9
2 changed files with 12 additions and 0 deletions

View File

@ -4,6 +4,8 @@
<param name="max-sessions" value="1000"/>
<!--Most channels to create per second -->
<param name="sessions-per-second" value="30"/>
<!--Most channels to create per second -->
<param name="loglevel" value="debug"/>
<!--Try to catch any crashes that can be recoverable (in the context of a call)-->
<param name="crash-protection" value="false"/>
<!--RTP port range -->

View File

@ -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")) {