[Freeswitch-svn] [commit] r5822 - in freeswitch/trunk: conf src

Freeswitch SVN anthm at freeswitch.org
Fri Oct 5 14:59:18 EDT 2007


Author: anthm
Date: Fri Oct  5 14:59:18 2007
New Revision: 5822

Modified:
   freeswitch/trunk/conf/switch.conf.xml
   freeswitch/trunk/src/switch_core.c

Log:
add loglevel param to switch.conf

Modified: freeswitch/trunk/conf/switch.conf.xml
==============================================================================
--- freeswitch/trunk/conf/switch.conf.xml	(original)
+++ freeswitch/trunk/conf/switch.conf.xml	Fri Oct  5 14:59:18 2007
@@ -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 -->

Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c	(original)
+++ freeswitch/trunk/src/switch_core.c	Fri Oct  5 14:59:18 2007
@@ -443,6 +443,16 @@
 					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")) {



More information about the Freeswitch-svn mailing list