[Freeswitch-branches] [commit] r11360 - freeswitch/branches/1.0/libs/esl

FreeSWITCH SVN mikej at freeswitch.org
Thu Jan 22 09:47:57 PST 2009


Author: mikej
Date: Thu Jan 22 11:47:57 2009
New Revision: 11360

Log:
fs_cli: add "debug" command to change the esl debug level at runtime (r:11057)

Modified:
   freeswitch/branches/1.0/libs/esl/fs_cli.c

Modified: freeswitch/branches/1.0/libs/esl/fs_cli.c
==============================================================================
--- freeswitch/branches/1.0/libs/esl/fs_cli.c	(original)
+++ freeswitch/branches/1.0/libs/esl/fs_cli.c	Thu Jan 22 11:47:57 2009
@@ -285,6 +285,17 @@
 
 			goto end;
 		}
+		
+		if (!strncasecmp(cmd, "debug", 5)){
+			int tmp_debug = atoi(cmd+6);
+			if (tmp_debug > -1 && tmp_debug < 8){
+				esl_global_set_default_logger(tmp_debug);
+				printf("fs_cli debug level set to %d\n", tmp_debug);
+			} else {
+				printf("fs_cli debug level must be 0 - 7\n");
+			}
+			goto end;
+		}
 	
 		printf("Unknown command [%s]\n", cmd);
 	} else {



More information about the Freeswitch-branches mailing list