[GRASS-dev] G_program_name to every message

Jachym Cepicky jachym.cepicky at centrum.cz
Sun Jan 7 13:00:08 EST 2007


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20070107/2a86ca0e/attachment.bin


More information about the grass-dev mailing list