Re: Glib logging disable patch



On Sat, 23 Dec 2000, Alexander Larsson wrote:

> 
> 
> On Fri, 22 Dec 2000, Federico Mena Quintero wrote:
> 
> > Alexander Larsson <alla lysator liu se> writes:
> > 
> > > This patch is critical in compiling a slimmed down glib.
> > > Is this ok to check in?
> > >
> > > +
> > > +#if defined(G_DISABLE_LOGGING)
> > > +
> > >  #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
> > > +#define g_error(...)    (void)0
> > > +#define g_message(...)  (void)0
> > > +#define g_critical(...) (void)0
> > > +#define g_warning(...)  (void)0
> > > +#elif __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 4)
> > > +#define g_error(format...) (void)0
> > > +#define g_message(format...) (void)0
> > > +#define g_critical(format...) (void)0
> > > +#define g_warning(format...) (void)0
> > > +#else   /* !__GNUC__ */
> > > +static void
> > > +g_error (const gchar *format, ...)
> > > +{
> > > +}
> > 
> > Shouldn't g_error() at least abort()?
> 
>  Yes, probably.

apart from that, could you say _why_ disabling all logging
functions is so important? is this about saving the the
actually logging strings? in that case, couldn't we at least
leave something like the stringified file name plus a line
number integer to give at least a minor hint as to where
something went wrong?
also for g_message(), some reporting functions become basically
non-functional which doesn't seem to be that good of an idea.

> 
> / Alex
> 

---
ciaoTJ





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]