gstreamer logs

Nicolas Dufresne nicolas.dufresne at collabora.co.uk
Thu Feb 21 08:58:09 PST 2013


Le mercredi 20 février 2013 à 22:09 -0800, Raju a écrit : 
> Hi Tim,
> 
> Thank you for quick response. I appreciate you help. I need your help to
> implement the following scenario.
>            
> 1. I want to dump the gstreamer log information to a file. I know one way of
> doing it. I can set log file path using env variable *GST_DEBUG_FILE*, then
> the log details will be dumped to the file. Is there any other way to set
> the log file inside c module?

To do this from C you get using setenv(), or set a custom log function
that writes the logs to the destination you want (see
gst_debug_add_log_function()).

> 
> 2. I want to have multiple log files. I want to dump my component log
> details to my_component.log file, gstreamer log details to gstreamer.log
> file and other gstreamer plugin log details to other_plugin.log file. How
> can I do this? How can I set different log files to different components to
> dump log details.?

In the GstLogFunction signature (function set using
gst_debug_add_log_function()), you can get the GstDebugCategory name
(using gst_debug_category_get_name()) to choose which file you are going
to write to.

regards,
Nicolas



More information about the gstreamer-devel mailing list