[GRASS-dev] G_program_name to every message

Brad Douglas rez at touchofmadness.com
Sun Jan 7 21:14:54 EST 2007


No.  The only place that is appropriate is G_debug().  Average users
could care less about that information and will likely complain about
it.

On Sun, 2007-01-07 at 20:42 -0500, Daniel Calvelo wrote:
> Hi Jachym. Great idea. I would condition that on the debug environment
> variable. You might even consider adding __FILE__ and __LINE__
> references then.
> 
> Daniel.
> 
> On 1/7/07, Jachym Cepicky <jachym.cepicky at centrum.cz> wrote:
> > Hallo,
> >
> > I think it would be nice, if G_message, G_warning and G_fatal_error
> > would print module name at the beginning of the message.
> >
> > If the modules are used in scripts, it is sometimes difficult to
> > identify, which C-module, used in the script, caused some problem or is
> > printing the message. This is the case for e.g. r.report (file stats.c)
> > too.
> >
> > What about adding G_program_name(); to every message, so that
> >
> >     G_message("Hallo, world!");
> >
> > would produce
> >
> >     g.module: Hallo, world!
> >
> > and
> >     G_warning("Hallo, world!"); -> WARNING: g.module: Hallo, world!
> >
> > ??
> >
> > The question is, how to do it... Imho the best place is printf_error();
> > in error.c
> >
> > What do you think?


-- 
Brad Douglas <rez touchofmadness com>                    KB8UYR/6
Address: 37.493,-121.924 / WGS84    National Map Corps #TNMC-3785




More information about the grass-dev mailing list