Capture "critical" messages

Tim-Philipp Müller t.i.m at zen.co.uk
Wed Feb 27 06:03:20 PST 2013


On Wed, 2013-02-27 at 04:46 -0800, Wes Miller wrote:
> Occasionally as I develop a new pipeline I will make an error that causes the
> pipeline to emit critical warnings and/or critical errors.  These messages
> just pop-up on my screen and, since I already have a bunch of program debug
> print statements sending stuff to the screen, I don't always see them and
> they aren't captured into my logs (program logs, not gst ones).
> 
> So, how do I capture these messages?  I assume there is a callback routine
> to capture them.
> 
> Or, how do I programatically turn on gsgtreamer logging.  I'd prefer not to
> use command line switches nor environment variables as this particular
> project is a dll/so where I'd like to be able to let the main program
> control the gst logging by a library call.  Of course, I'd also like to be
> able to restrict the class/type of the logged information.

Those criticals/errors usually indicate a programming error somewhere,
either in the application or in a plugin, and might just lead to a crash
in other circumstances.

You can capture them programmatically by setting up a log handler in
GLib, like this:

http://cgit.freedesktop.org/gstreamer/gstreamer/tree/libs/gst/check/gstcheck.c#n124

Cheers
 -Tim



More information about the gstreamer-devel mailing list