From: David Goulet Date: Mon, 26 May 2014 18:52:58 +0000 (-0400) Subject: List session event loglevel for the JUL domain X-Git-Tag: v2.5.0-rc1~9 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ff94328ff1538f1da009e81a27bbd922ef031727;p=lttng-tools.git List session event loglevel for the JUL domain Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 2536dc72d..a57409d41 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -221,6 +221,8 @@ static int list_lttng_jul_events(struct jul_domain *dom, strncpy(tmp_events[i].name, event->name, sizeof(tmp_events[i].name)); tmp_events[i].name[sizeof(tmp_events[i].name) - 1] = '\0'; tmp_events[i].enabled = event->enabled; + tmp_events[i].loglevel = event->loglevel; + tmp_events[i].loglevel_type = event->loglevel_type; i++; } rcu_read_unlock(); diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index 08518dc0c..8c1d5af87 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -177,6 +177,34 @@ const char *exclusion_string(int value) } } +static const char *loglevel_jul_string(int value) +{ + switch (value) { + case -1: + return ""; + case LTTNG_LOGLEVEL_JUL_OFF: + return "JUL_OFF"; + case LTTNG_LOGLEVEL_JUL_SEVERE: + return "JUL_SEVERE"; + case LTTNG_LOGLEVEL_JUL_WARNING: + return "JUL_WARNING"; + case LTTNG_LOGLEVEL_JUL_INFO: + return "JUL_INFO"; + case LTTNG_LOGLEVEL_JUL_CONFIG: + return "JUL_CONFIG"; + case LTTNG_LOGLEVEL_JUL_FINE: + return "JUL_FINE"; + case LTTNG_LOGLEVEL_JUL_FINER: + return "JUL_FINER"; + case LTTNG_LOGLEVEL_JUL_FINEST: + return "JUL_FINEST"; + case LTTNG_LOGLEVEL_JUL_ALL: + return "JUL_ALL"; + default: + return "<>"; + } +} + static const char *loglevel_string(int value) { switch (value) { @@ -583,8 +611,10 @@ static int list_session_jul_events(void) } for (i = 0; i < count; i++) { - MSG("%s- %s%s", indent4, events[i].name, - enabled_string(events[i].enabled)); + MSG("%s- %s%s (loglevel%s %s)", indent4, events[i].name, + enabled_string(events[i].enabled), + logleveltype_string(events[i].loglevel_type), + loglevel_jul_string(events[i].loglevel)); } MSG("");