List session event loglevel for the JUL domain
authorDavid Goulet <dgoulet@efficios.com>
Mon, 26 May 2014 18:52:58 +0000 (14:52 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 26 May 2014 18:52:58 +0000 (14:52 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/cmd.c
src/bin/lttng/commands/list.c

index 2536dc72da28051f9edb6204c834a3b179a5c8fd..a57409d411b10ac09e53e655ca9cfc8c4a215710 100644 (file)
@@ -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();
index 08518dc0ca26ba0436a970c58ac38ce39b768341..8c1d5af87fd25bfb638aa946fdd13a771afe4a6c 100644 (file)
@@ -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 "<<UNKNOWN>>";
+       }
+}
+
 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("");
This page took 0.037777 seconds and 4 git commands to generate.