Why GStreamer's core is using GLib's log functions instead of its own?

Dmitry Valento va.dimon at tut.by
Thu Feb 23 11:47:19 UTC 2017


Hello

I needed to redirect ALL log messages to syslog. I created a function
GstLogFunction and installed it with gst_debug_add_log_function.
It was a little bit surprisingly, when some messages were printed to stderr
anyway.
I've found out, that GLib's log functions (like g_warning, g_critical) are
used in GStreamer's core (and in some plugins too) instead of GStreamer's
functions (which are described in GstInfo).

Finally, it was managed to catch all messages:
g_log_set_handler("GStreamer", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL |
G_LOG_FLAG_RECURSION, syslog_handler, NULL);

"GStreamer" - is predefined log domain which is declared by variable
g_log_domain_gstreamer in gst/gst.c

Could you, please, give me clarification about proper log message catching?
Why GStreamer's core is using GLib's log functions instead of its own?




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Why-GStreamer-s-core-is-using-GLib-s-log-functions-instead-of-its-own-tp4682002.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list