[Bug 797314] in some cases, no log can be printed

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Oct 22 15:33:12 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=797314

--- Comment #6 from Stephen Xiao <stephen.xiao.zh at outlook.com> ---
(In reply to Sebastian Dröge (slomo) from comment #5)
> (In reply to Stephen Xiao from comment #4)
> > (In reply to Sebastian Dröge (slomo) from comment #1)
> > > Can you provide this as a "git format-patch"-style patch? See
> > > https://gstreamer.freedesktop.org/documentation/contribute/index.html#how-to-
> > > submit-patches
> > > 
> > > It doesn't look correct however. The comparison should be <= _gst_debug_min
> > > because that one is the global maximum (no idea why it is called min!) of
> > > all debug category levels that are enabled.
> > > 
> > > How can the problem you observe be reproduced?
> > 
> > Actually there have a MACRO GST_LEVEL_MAX, I think it means golbal maximum.
> 
> Yes, that's fine. If GST_LEVEL_MAX is e.g. WARNING, then that means that
> everything apart from WARNING and ERROR is compiled out statically.
> 
> > From code, we can easy find the comment about _gst_debug_min.
> > 
> >  617 /* the min debug level, used for quickly discarding debug              
> > 
> >  618  * messages that fall under the threshold. */                          
> > 
> >  619                                                                        
> > 
> >  620 GST_API GstDebugLevel            _gst_debug_min;     
> 
> It's a bit misnamed. If you enable category A with level WARNING, it will be
> WARNING. If you then enable category B with level DEBUG it will be DEBUG.
> Enabling category C with level FIXME does not change anything, enabling
> category D with level MEMDUMP will change it to MEMDUMP.
> 
> It's the maximum of any category that is currently enabled.
> 
> > It's very easy to reproduce. Just enable gstreamer's debug and set debug
> > level to a vaild value(eg:GST_LEVEL_DEBUG), you will find there is no info
> > printing from your debugging code.
> 
> That works fine for me. Can you provide exact steps how to reproduce it?
> What behaviour do you see, what would you expect instead?

Oh, thanks to your explation. I just find that the code is right, it's my
mistake. : ) _gst_debug_min is a variable not a MACRO.

Thanks to your patience again!

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list