[GRASS-dev] Re: g.rename consolidation
jachym.cepicky at gmail.com
Wed Feb 28 10:01:52 CET 2007
after discussion with Martin, I suggest:
GRASS_VERBOSE=0 ... QUIET_MODE - print nothing
GRASS_VERBOSE=1 ... PERCENT_MODE - print only progress information
(with relevant messge maybe?)
GRASS_VERBOSE=2 ... MESSAGE_MODE - print only messages, withou any
GRASS_VERBOSE=3 ... PERMSG_MODE - print progress and messages
GRASS> g.module --q -> QUIET_MODE
GRASS> g.module --v -> PERMSG_MODE
We are also discussing another problem:
If GRASS_VERBOSE==1, only percents are printed out, which is a little
bit confusing. It would be great, if the output would look like this:
GRASS> GRASS_VERBOSE=1; v.convert in out
Reading vector lines: 50 %
Writing vector lines: 23 %
But how to perform this?
1) On module level:
if (G_verbose() == PERCENT_MODE) G_message("Reading vector lines");
2) Introduce new function:
G_message_percent("Reading vector lines");
3) Add new parameter to G_percent:
G_percent("Reading vector lines", x,y);
or maybe better:
char s="Reading vector lines";
Some comments added to wiki
2007/2/27, Glynn Clements <glynn at gclements.plus.com>:
> Martin Landa wrote:
> > just to summarize, I suggest to reduce verbosity levels to three levels:
> > --q 0 MIN_LEVEL (only warnings + fatal_errors)
> > 1 STD_LEVEL (progress information)
> > --v 2 MAX_LEVEL (any "useful" information, another points is what is "useful")
> > E.g. Vect_build () output:
> > 0 ... nothing printed
> > 1 ... Registering lines: ... , etc.
> > 2 ... all current info
> > Three level are enough I think, then we should move selected messages
> > to G_debug (1, ).
> > Any objections (in case I missed something)?
> That seems reasonable.
> On a related note, I would appreciate some way to disable percentage
> output separately from other messages. My usual terminal (XEmacs'
> shell-mode) doesn't support ^H, so the G_percent() output is garbage.
> Glynn Clements <glynn at gclements.plus.com>
> grass-dev mailing list
> grass-dev at grass.itc.it
e-mail: jachym.cepicky gmail com
More information about the grass-dev