Fix: add loglevel type to lttng list <name>
authorDavid Goulet <dgoulet@efficios.com>
Wed, 26 Feb 2014 18:22:32 +0000 (13:22 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 26 Feb 2014 18:36:37 +0000 (13:36 -0500)
For range loglevel, the <= is used and for single ==. For instance:

ev_log_range (loglevel <= TRACE_WARNING (4)) (type: tracepoint)
ev_log_single (loglevel == TRACE_NOTICE (5)) (type: tracepoint)

Fixes #628

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng/commands/list.c

index 66a322a06adb650b2a593c9147a7d9ed556bf8ba..1a46bb72b221f2d75f9cd82ea94a13b3ef457450 100644 (file)
@@ -217,6 +217,18 @@ static const char *loglevel_string(int value)
        }
 }
 
+static const char *logleveltype_string(enum lttng_loglevel_type value)
+{
+       switch (value) {
+       case LTTNG_EVENT_LOGLEVEL_RANGE:
+               return "<=";
+       case LTTNG_EVENT_LOGLEVEL_SINGLE:
+               return "==";
+       default:
+               return "<<TYPE UNKN>>";
+       }
+}
+
 /*
  * Pretty print single event.
  */
@@ -226,9 +238,10 @@ static void print_events(struct lttng_event *event)
        case LTTNG_EVENT_TRACEPOINT:
        {
                if (event->loglevel != -1) {
-                       MSG("%s%s (loglevel: %s (%d)) (type: tracepoint)%s%s%s",
+                       MSG("%s%s (loglevel %s %s (%d)) (type: tracepoint)%s%s%s",
                                indent6,
                                event->name,
+                               logleveltype_string(event->loglevel_type),
                                loglevel_string(event->loglevel),
                                event->loglevel,
                                enabled_string(event->enabled),
This page took 0.037479 seconds and 4 git commands to generate.