git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3110
d0543943-73ff-0310-b7d9-
9358b9ac24b2
} else if (!strncasecmp(cmd, "log", 3)) {
char *level_s;
+
+ //pull off the first newline/carriage return
strip_cr(cmd);
- level_s = cmd + 4;
+ //move past the command
+ level_s = cmd + 3;
+ //see if we got an argument
+ if(!switch_strlen_zero(level_s)) {
+ //if so move to the argument
+ level_s++;
+ }
+
+ //see if we lined up on an argument or not
if (switch_strlen_zero(level_s)) {
level_s = "debug";
}