Set default loglevel in metadata
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 10 Feb 2012 18:17:11 +0000 (13:17 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 10 Feb 2012 18:17:11 +0000 (13:17 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/ltt-events.c

index 9d5d882794dbe9a555405a3c0f0f84b8714f93b0..c4b67c6be04d8274048fa1c77a85e67e51eaf02d 100644 (file)
@@ -878,6 +878,7 @@ int _ltt_event_metadata_statedump(struct ltt_session *session,
                                  struct ltt_event *event)
 {
        int ret = 0;
+       int loglevel = TRACE_DEFAULT;
 
        if (event->metadata_dumped || !CMM_ACCESS_ONCE(session->active))
                return 0;
@@ -900,13 +901,14 @@ int _ltt_event_metadata_statedump(struct ltt_session *session,
        if (ret)
                goto end;
 
-       if (event->desc->loglevel) {
-               ret = lttng_metadata_printf(session,
-                       "       loglevel = %d;\n",
-                       *(*event->desc->loglevel));
-               if (ret)
-                       goto end;
-       }
+       if (event->desc->loglevel)
+               loglevel = *(*event->desc->loglevel);
+
+       ret = lttng_metadata_printf(session,
+               "       loglevel = %d;\n",
+               loglevel);
+       if (ret)
+               goto end;
 
        if (event->ctx) {
                ret = lttng_metadata_printf(session,
This page took 0.025552 seconds and 4 git commands to generate.