]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
why didnt we do this earlier
authorKen Rice <krice@freeswitch.org>
Fri, 2 Jan 2009 17:40:26 +0000 (17:40 +0000)
committerKen Rice <krice@freeswitch.org>
Fri, 2 Jan 2009 17:40:26 +0000 (17:40 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11057 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/esl/fs_cli.c

index 7fb3a734dc5c9325c791cb6c9629c36eec9cbb8e..fcc36b2234084c7b47dfb90b7abde8c076ff9f9f 100644 (file)
@@ -285,6 +285,17 @@ static int process_command(esl_handle_t *handle, const char *cmd)
 
                        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 {