[gst-devel] gstinfo and --gst-debug-no-time --gst-debug-no-pid

Tim Müller t.i.m at zen.co.uk
Wed Sep 28 02:42:45 CEST 2005


On Wed, 2005-09-28 at 11:12 +0200, Stefan Kost wrote:

> I had the need to diff log-output to see where my application does something 
> different. The default logoutput is not well suited for that as it includes 
> stuff like absolute timestamps and pids.
> 
> One idea would be to add more commandline options to control logging in the 
> style of --gst-debug-no-color like  --gst-debug-no-time --gst-debug-no-pid. 
> Additionally there would be new api
> gst_info_{s,g}et_log_time()
> gst_info_{s,g}et_log_pid()
> 
> The downside is that any 'if'-statement in the logger (gst_debug_log_default()) 
> is not very nice.
> 
> Any objections if I make the change this evening?

I'm wondering whether those additional options will be useful for
anything besides cutting down on the amount of text output. I've tried
something very similar the other day, and I've found that diff'ing log
output won't work even in simple cases like fakesrc ! identity !
fakesink, even if you create per-thread logs and diff those. Things will
happen in a different order depending on small timing differences and
which thread gets to do something first, and from then on, everything
else will be different (memory allocation etc.)

Do you actually get useful results with the change you propose?

You can always

  cat dbg.log | colrm a b | colrm c d > dbg-clean.log 

on both logs to remove the timestamps and PIDs and then compare them...


While we're at it, I also think we should be trying to get rid of exotic
--gst-foo options instead of adding them like there's no tomorrow.
Wouldn't an environment variable be enough? In fact, shouldn't we maybe
move to only use environment variables for the debugging stuff and ditch
the --gst-debug-foo options altogether?

Cheers
 -Tim






More information about the gstreamer-devel mailing list