[gst-devel] gstinfo and --gst-debug-no-time --gst-debug-no-pid
Stefan Kost
ensonic at hora-obscura.de
Wed Sep 28 03:06:34 CEST 2005
Hi Time,
Tim Müller wrote:
> 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.)
Yeah, I change many of my log string to not include memory locations and stuff
like that. Anyway the overall order was much more comparable that I thought.
>
> 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
Cool, didn't know about 'colrm'. Will try to post filter logs first.
>
> 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?
I don't think that the existing commandline opts are a problem for users as the
will launch stuff from graphical shells (menu etc.).
>
> Cheers
> -Tim
>
More information about the gstreamer-devel
mailing list