提交 d484959b authored 作者: Anthony Minessale's avatar Anthony Minessale

add loglevel param to switch.conf

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5822 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 464ba5a3
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
<param name="max-sessions" value="1000"/> <param name="max-sessions" value="1000"/>
<!--Most channels to create per second --> <!--Most channels to create per second -->
<param name="sessions-per-second" value="30"/> <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)--> <!--Try to catch any crashes that can be recoverable (in the context of a call)-->
<param name="crash-protection" value="false"/> <param name="crash-protection" value="false"/>
<!--RTP port range --> <!--RTP port range -->
......
...@@ -443,6 +443,16 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(const char *console, switch_cor ...@@ -443,6 +443,16 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(const char *console, switch_cor
if (switch_true(val)) { if (switch_true(val)) {
switch_set_flag((&runtime), SCF_CRASH_PROT); 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")) { } else if (!strcasecmp(var, "sessions-per-second")) {
switch_core_sessions_per_second(atoi(val)); switch_core_sessions_per_second(atoi(val));
} else if (!strcasecmp(var, "max-sessions")) { } else if (!strcasecmp(var, "max-sessions")) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论