From: David Goulet Date: Tue, 26 Jul 2011 13:45:34 +0000 (-0400) Subject: Increase possible verbose level for session daemon X-Git-Tag: v2.0-pre4~9 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=53086306dfc364a5f0f322df38639235906d22d1;p=lttng-tools.git Increase possible verbose level for session daemon Using -vv, the kernel consumer goes into verbose mode. Signed-off-by: David Goulet --- diff --git a/ltt-sessiond/main.c b/ltt-sessiond/main.c index a78cc7e02..92ece5a11 100644 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@ -906,6 +906,7 @@ static pid_t spawn_kconsumerd(void) { int ret; pid_t pid; + const char *verbosity; DBG("Spawning kconsumerd"); @@ -914,7 +915,12 @@ static pid_t spawn_kconsumerd(void) /* * Exec kconsumerd. */ - execl(INSTALL_BIN_PATH "/ltt-kconsumerd", "ltt-kconsumerd", "--quiet", NULL); + if (opt_verbose > 1) { + verbosity = "--verbose"; + } else { + verbosity = "--quiet"; + } + execl(INSTALL_BIN_PATH "/ltt-kconsumerd", "ltt-kconsumerd", verbosity, NULL); if (errno != 0) { perror("kernel start consumer exec"); } @@ -2243,7 +2249,8 @@ static int parse_args(int argc, char **argv) opt_quiet = 1; break; case 'v': - opt_verbose = 1; + /* Verbose level can increase using multiple -v */ + opt_verbose += 1; break; default: /* Unknown option or other error.