[GRASS-dev] G_program_name to every message
Daniel Calvelo
dca.gis at gmail.com
Sun Jan 7 20:42:55 EST 2007
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?
>
> Jachym
> --
> Jachym Cepicky
> e-mail: jachym.cepicky at centrum.cz
> URL: http://les-ejk.cz
> GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub
> -----------------------------------------
> OFFICE:
> Department of Geoinformation Technologies
> Zemedelska 3
> 613 00, Brno
> Czech Republick
> e-mail: xcepicky at node.mendelu.cz
> URL: http://mapserver.mendelu.cz
> Tel.: +420 545 134 514
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
>
> iD8DBQFFoTUoyKt0uAjU4I8RAklPAJ9nv9alWvXazqqsxzacKR0+uJA5lwCfTKxi
> ZHX8m3KrvQyWQqUI3V/QRwQ=
> =ns2o
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>
>
--
-- Daniel Calvelo Aros
More information about the grass-dev
mailing list