mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 22:05:58 +00:00
reporter: Use Gst debugging log in the _report method directly
Using __VALIST__ was not properly working + Add a gstqareporter debug category
This commit is contained in:
parent
4fb8f47770
commit
d804ad475a
2 changed files with 15 additions and 12 deletions
|
@ -22,6 +22,9 @@
|
|||
|
||||
#define REPORTER_PRIVATE "gst-qa-reporter-private"
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_qa_reporter);
|
||||
#define GST_CAT_DEFAULT gst_qa_reporter
|
||||
|
||||
typedef struct _GstQaReporterPrivate
|
||||
{
|
||||
GstQaRunner *runner;
|
||||
|
@ -32,6 +35,9 @@ typedef struct _GstQaReporterPrivate
|
|||
static void
|
||||
gst_qa_reporter_default_init (GstQaReporterInterface * iface)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (gst_qa_reporter, "gstqareporter",
|
||||
GST_DEBUG_FG_MAGENTA, "gst qa reporter");
|
||||
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_object ("qa-runner", "QA Runner", "The QA runner to "
|
||||
"report errors to", GST_TYPE_QA_RUNNER,
|
||||
|
@ -97,6 +103,15 @@ gst_qa_report_valist (GstQaReporter * reporter, gboolean repeat,
|
|||
g_hash_table_insert (priv->reports, report_id, report);
|
||||
}
|
||||
|
||||
if (level == GST_QA_REPORT_LEVEL_CRITICAL)
|
||||
GST_ERROR ("<%s>: %s", priv->name, message);
|
||||
else if (level == GST_QA_REPORT_LEVEL_WARNING)
|
||||
GST_WARNING ("<%s>: %s", priv->name, message);
|
||||
else if (level == GST_QA_REPORT_LEVEL_ISSUE)
|
||||
GST_LOG ("<%s>: %s", priv->name, message);
|
||||
else
|
||||
GST_DEBUG ("<%s>: %s", priv->name, message);
|
||||
|
||||
GST_INFO_OBJECT (reporter, "Received error report %d : %d : %d : %s",
|
||||
level, area, subarea, message);
|
||||
gst_qa_report_printf (report);
|
||||
|
|
|
@ -44,22 +44,16 @@ G_STMT_START { \
|
|||
|
||||
#define GST_QA_REPORT_CRITICAL(m, repeat, area, subarea, ...) \
|
||||
G_STMT_START { \
|
||||
GST_ERROR_OBJECT (m, "Critical report: %s: %s: %s", \
|
||||
#area, #subarea, __VA_ARGS__); \
|
||||
GST_QA_REPORT(m, repeat, CRITICAL, area, subarea, __VA_ARGS__); \
|
||||
} G_STMT_END
|
||||
|
||||
#define GST_QA_REPORT_WARNING(m, repeat, area, subarea, ...) \
|
||||
G_STMT_START { \
|
||||
GST_WARNING_OBJECT (m, "Warning report: %s: %s: %s", \
|
||||
#area, #subarea, __VA_ARGS__); \
|
||||
GST_QA_REPORT(m, repeat, WARNING, area, subarea, __VA_ARGS__); \
|
||||
} G_STMT_END
|
||||
|
||||
#define GST_QA_REPORT_ISSUE(m, repeat, area, subarea, ...) \
|
||||
G_STMT_START { \
|
||||
GST_WARNING_OBJECT (m, "Issue report: %s: %s: %s", \
|
||||
#area, #subarea, __VA_ARGS__); \
|
||||
GST_QA_REPORT(m, repeat, ISSUE, area, subarea, __VA_ARGS__); \
|
||||
} G_STMT_END
|
||||
#else /* G_HAVE_GNUC_VARARGS */
|
||||
|
@ -73,22 +67,16 @@ G_STMT_START { \
|
|||
|
||||
#define GST_QA_REPORT_CRITICAL(m, repeat, area, subarea, args...) \
|
||||
G_STMT_START { \
|
||||
GST_ERROR_OBJECT (m, "Critical report: %s: %s: %s", \
|
||||
#area, #subarea, ##args); \
|
||||
GST_QA_REPORT(m, repeat, CRITICAL, area, subarea, ##args); \
|
||||
} G_STMT_END
|
||||
|
||||
#define GST_QA_REPORT_WARNING(m, repeat, area, subarea, args...) \
|
||||
G_STMT_START { \
|
||||
GST_WARNING_OBJECT (m, "Warning report: %s: %s: %s", \
|
||||
#area, #subarea, ##args); \
|
||||
GST_QA_REPORT(m, repeat, WARNING, area, subarea, ##args); \
|
||||
} G_STMT_END
|
||||
|
||||
#define GST_QA_REPORT_ISSUE(m, repeat, area, subarea, args...) \
|
||||
G_STMT_START { \
|
||||
GST_WARNING_OBJECT (m, "Issue report: %s: %s: %s", \
|
||||
#area, #subarea, ##args); \
|
||||
GST_QA_REPORT(m, repeat, ISSUE, area, subarea, ##args); \
|
||||
} G_STMT_END
|
||||
#endif /* G_HAVE_ISO_VARARGS */
|
||||
|
|
Loading…
Reference in a new issue