validate: Add details on all g_log message reports.
authorThibault Saunier <tsaunier@igalia.com>
Sun, 3 May 2020 05:22:04 +0000 (01:22 -0400)
committerThibault Saunier <tsaunier@igalia.com>
Wed, 6 May 2020 22:54:59 +0000 (22:54 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/187>

validate/gst/validate/gst-validate-report.c
validate/gst/validate/gst-validate-runner.c

index cd30dc1..2372c7e 100644 (file)
@@ -463,11 +463,13 @@ gst_validate_report_load_issues (void)
       _
       ("Pad buffers push frequency is lower than the minimum required by the config"),
       NULL);
-  REGISTER_VALIDATE_ISSUE (WARNING, G_LOG_WARNING, _("We got a g_log warning"),
-      NULL);
-  REGISTER_VALIDATE_ISSUE (CRITICAL, G_LOG_CRITICAL,
-      "We got a g_log critical issue", NULL);
-  REGISTER_VALIDATE_ISSUE (ISSUE, G_LOG_ISSUE, "We got a g_log issue", NULL);
+  REGISTER_VALIDATE_ISSUE_FULL (WARNING, G_LOG_WARNING,
+      _("We got a g_log warning"), NULL, GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS);
+  REGISTER_VALIDATE_ISSUE_FULL (CRITICAL, G_LOG_CRITICAL,
+      "We got a g_log critical issue", NULL,
+      GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS);
+  REGISTER_VALIDATE_ISSUE_FULL (ISSUE, G_LOG_ISSUE, "We got a g_log issue",
+      NULL, GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS);
 
   REGISTER_VALIDATE_ISSUE (CRITICAL, PULL_RANGE_FROM_WRONG_THREAD,
       "gst_pad_pull_range called from wrong thread",
index 386fee8..06d0a0f 100644 (file)
@@ -764,13 +764,15 @@ _do_report_synthesis (GstValidateRunner * runner)
     if (report->level == GST_VALIDATE_REPORT_LEVEL_CRITICAL) {
       criticals = g_list_append (criticals, report);
       gst_validate_report_print_details (report);
-    }
+    } else if (report->issue->flags & GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS)
+      gst_validate_report_print_details (report);
 
     for (tmp = g_list_next (reports); tmp; tmp = tmp->next) {
       report = (GstValidateReport *) tmp->data;
       gst_validate_report_print_detected_on (report);
 
-      if (report->level == GST_VALIDATE_REPORT_LEVEL_CRITICAL) {
+      if ((report->level == GST_VALIDATE_REPORT_LEVEL_CRITICAL) ||
+          (report->issue->flags & GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS)) {
         criticals = g_list_append (criticals, report);
         gst_validate_report_print_details (report);
       }