add adjustable log level and sps via fsctl

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5793 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-10-04 14:19:51 +00:00
parent 7c125a5d19
commit 0b9482f1fd
3 changed files with 19 additions and 4 deletions

View File

@@ -127,7 +127,15 @@ SWITCH_STANDARD_API(ctl_function)
arg = -1;
}
switch_core_session_ctl(SCSC_LOGLEVEL, &arg);
stream->write_function(stream, "log level %s [%d]\n", switch_log_level2str(arg), arg);
stream->write_function(stream, "log level: %s [%d]\n", switch_log_level2str(arg), arg);
} else if (!strcasecmp(argv[0], "sps")) {
if (argc > 1) {
arg = atoi(argv[1]);
} else {
arg = 0;
}
switch_core_session_ctl(SCSC_SPS, &arg);
stream->write_function(stream, "sessions per second: %d\n", arg);
} else {
stream->write_function(stream, "INVALID COMMAND\nUSAGE: fsctl [hupall|pause|resume|shutdown]\n");
goto end;