[gst-devel] Error messages printed on console

Thomas Vander Stichele thomas at apestaart.org
Thu Feb 26 07:18:10 CET 2004


On Thu, 2004-02-26 at 16:04, Benjamin Otte wrote:
> Quoting Thomas Vander Stichele <thomas at apestaart.org>:
> 
> > Huh ? I'm not sure where this is your fault - the reason this happens is
> > because GST_ELEMENT_ERROR has a GST_ERROR_OBJECT call.  I agree that it
> > shouldn't print out errors by default, so I'm changing this to
> > GST_WARNING_OBJECT instead.  Since an application can decide to recover
> > from an error, it really shouldn't be treated as an error for debugging
> > purposes.
> > 
> It should print out errors by default on _developer_ builds. 

Well, I don't agree, but it's debatable.

> Which is what it 
> does. See configure.ac:
> 
> dnl define correct errorlevel for debugging messages. We want to have GST_ERROR
> dnl messages printed when running cvs builds
> if test "x$GST_CVS" = "xyes"; then
>   AC_DEFINE(GST_LEVEL_DEFAULT, GST_LEVEL_ERROR, [Default errorlevel to use])
> fi

ok.

> You might want to download 0.7.4 to check that the release versions do not 
> print out anything.

I trust you.

> And if you change the GST_ERROR_OBJECT to GST_WARNING_OBJECT you might want to 
> explain why you did this.
> The documentation for GST_LEVEL_ERROR states:
> "Error messages are to be used only when an error occured 
> that stops the application from keeping working correctly.
> An examples is gst_element_error, which outputs a message with this priority.

gst_element_error is not a good example of something stopping the
application from working correctly.

Rather, GST_ELEMENT_ERROR is used when the *library* or *element* cannot
proceed anymore.  The application can easily recover from this if it
wishes to do so.  It is because of this distinction that I think that
there is a clear difference between "errors that stop GStreamer from
working completely" or "errors that stop GStreamer from further
processing without intervention from the application".

I am fine with the ERROR log level being used for GST_ELEMENT_ERROR
logging, and even only for this (as long as we make it clear it is meant
for errors that the application can still recover from).
However, I see no reason to have them printed by default for development
builds.  I don't mind going with a consensus on that, either, but some
people have brought up they don't see why they get printed if the
application already shows them in the GUI.

Let me know which of the bits (docs for ERROR, default message level,
log level of GST_ELEMENT_ERROR) you want fixed.

Thomas

Dave/Dina : future TV today ! - http://www.davedina.org/
<-*- thomas (dot) apestaart (dot) org -*->
Welcome to Hits City, Jeff K - Population: you
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/






More information about the gstreamer-devel mailing list