[GRASS-dev] verbosity and G_done_msg

Hallo,

I'm not shure, if I should leave G_done_msg("") at end of some modules.

User actually does not care, that some module is done - he allready
knows it.

It could be useful for scripts, so that the user does see progress of
the module.

But this can be done trough "echo"s

What do you think: should I remove G_done_msg("") funcitions from the
end of each main() function of each module or should we add this
function to end of each module?

I would remove it, IMHO it has no sence to report end of the program,
when it ends.

Jachym
--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/jachym_cepicky-gpg_public_key.asc
-----------------------------------------
OFFICE:
Department of Geoinformation Technologies
Zemedelska 3
613 00, Brno
Czech Republick
e-mail: xcepicky@node.mendelu.cz
URL: http://mapserver.mendelu.cz
Tel.: +420 545 134 514

Hi Jachym,

for several commands where G_percent() isn't used, the
G_done_msg("") is quite useful. Otherwise you don't
understand from the TclTk GUI when the command finishes.

Markus

On Sun, Oct 22, 2006 at 02:22:02PM +0200, Jachym Cepicky wrote:

Hallo,

I'm not shure, if I should leave G_done_msg("") at end of some modules.

User actually does not care, that some module is done - he allready
knows it.

It could be useful for scripts, so that the user does see progress of
the module.

But this can be done trough "echo"s

What do you think: should I remove G_done_msg("") funcitions from the
end of each main() function of each module or should we add this
function to end of each module?

I would remove it, IMHO it has no sence to report end of the program,
when it ends.

Jachym
--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/jachym_cepicky-gpg_public_key.asc
-----------------------------------------
OFFICE:
Department of Geoinformation Technologies
Zemedelska 3
613 00, Brno
Czech Republick
e-mail: xcepicky@node.mendelu.cz
URL: http://mapserver.mendelu.cz
Tel.: +420 545 134 514

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

--
Markus Neteler <neteler itc it> http://mpa.itc.it/markus/
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

Jachym Cepicky wrote:

I'm not shure, if I should leave G_done_msg("") at end of some
modules.

User actually does not care, that some module is done - he allready
knows it.

not necessarily! Even if the user returns to the GRASS> prompt.

Working....
GRASS>

did it finish or crash? (we crash a lot, unfortunately)
The user probably doesn't know about "echo $?" tests.

What do you think: should I remove G_done_msg("") funcitions from the
end of each main() function of each module or should we add this
function to end of each module?

I would remove it, IMHO it has no sence to report end of the program,
when it ends.

I believe it should be present. It uses G_message() so --quiet or
GRASS_VERBOSE<2 will get rid of it.

- It is not always clear when a GUI module has finished.

The module gui from the command line (without gis.m) has no "running
man".. the output messages just stop arriving.

- For long running modules it is very nice to have some sort of
reassurance that the module has finished successfully.

I would not add it to all modules automatically, e.g. for d.rast and
g.remove it is pointless.

Hamish

hi
On Mon, Oct 23, 2006 at 02:23:30PM +1300, Hamish wrote:

- For long running modules it is very nice to have some sort of
reassurance that the module has finished successfully.

I was thinking at some log file, where the progress and start/stop
messages would be saved and easilly extracted

any opinion to this?

jachym

--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/jachym_cepicky-gpg_public_key.asc
-----------------------------------------
OFFICE:
Department of Geoinformation Technologies
Zemedelska 3
613 00, Brno
Czech Republick
e-mail: xcepicky@node.mendelu.cz
URL: http://mapserver.mendelu.cz
Tel.: +420 545 134 514

Hamish wrote:

> I'm not shure, if I should leave G_done_msg("") at end of some
> modules.
>
> User actually does not care, that some module is done - he allready
> knows it.

not necessarily! Even if the user returns to the GRASS> prompt.

Working....
GRASS>

did it finish or crash? (we crash a lot, unfortunately)

If it terminated due to a signal, the shell will print an error
message corresponding to the signal which terminated it. A non-zero
exit() is usually (and should always be) accompanied by an explicit
error message.

--
Glynn Clements <glynn@gclements.plus.com>

Jachym Cepicky wrote:

> - For long running modules it is very nice to have some sort of
> reassurance that the module has finished successfully.

I was thinking at some log file, where the progress and start/stop
messages would be saved and easilly extracted

any opinion to this?

seems like it would get very big, very fast. When I've needed this in
the past I've just thrown a "date" command at the start and end of my
script. r.info and v.info store finishing times..

~/GIS_ERROR_LOG ?
  http://grass.ibiblio.org/grass63/manuals/html63_user/variables.html#files

Hamish