summaryrefslogtreecommitdiff
path: root/src/util/shell.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-03-15 11:07:12 +0100
committerHarald Welte <laforge@gnumonks.org>2013-03-15 11:07:12 +0100
commit3ec111676ff9e34058b3bf2e482a236f341c10eb (patch)
tree4a12ba3ccfd8ed8d15d0624ed0a41034043df9a4 /src/util/shell.c
parent4c14b6eb4183905dea8f0a2cea695cebb174815f (diff)
Add run-time changing of gsmd log level via libgsm/libgsmd-tool
Diffstat (limited to 'src/util/shell.c')
-rw-r--r--src/util/shell.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/shell.c b/src/util/shell.c
index 6b461be..f1333dc 100644
--- a/src/util/shell.c
+++ b/src/util/shell.c
@@ -604,6 +604,7 @@ static void shell_help(void)
"\tCFQ\tQuery the status of call forwarding (CFQ=reason)\n"
"\tCFR\tRegister call forwarding (CFR=reason,number)\n"
"\tCFe\tErase a record of call forwarding (CFe=reason)\n"
+ "\tlog=N\tSet gsmd Log Level (1=debug, 8=fatal)\n"
"\tq\tQuit\n"
);
}
@@ -1024,6 +1025,10 @@ int shell_main(struct lgsm_handle *lgsmh, int sync)
printf("Battery Connection status and Battery Charge Level\n");
lgsm_get_battery(lgsmh);
pending_responses++;
+ } else if (!strncmp(buf, "log=", 4)) {
+ int gsmd_loglevel = atoi(buf+4);
+ lgsm_set_gsmd_loglevel(lgsmh, gsmd_loglevel);
+ pending_responses++;
}else {
printf("Unknown command `%s'\n", buf);
}
personal git repositories of Harald Welte. Your mileage may vary