[GRASS-dev] added granularity in GRASS_VERBOSE

Jachym Cepicky jachym.cepicky at centrum.cz
Thu Oct 26 15:02:38 EDT 2006


hi,
do i understand it well, that with --verbose also debuging mode would be
started?

so there would be no easy and fast way, how to set verbose level to
STDLEVEL, just via env. variables?

sorry, i do not see any reason, why user should be able to enable
debuging messages with this flag. 

my apology, if i understand it wrong

cheers

jachym

On Thu, Oct 26, 2006 at 08:21:47PM +1300, Hamish wrote:
> Hi,
> 
> with the current G_verbose() there is no verbosity level above the
> default without getting into debug messages*. (no --very-verbose)
> 
> Looking to replace -v verbose flags, there's nowhere to go.
> 
> Can we change lib/gis/verbose.c  MAXLEVEL to 3? or 5 to match G_debug()
> as suggested on the list?
> 
> 
> Hamish
> 
> * G_debug() is still mostly broken for me in 6.3! (they don't display)

> Index: verbose.c
> ===================================================================
> RCS file: /home/grass/grassrepository/grass6/lib/gis/verbose.c,v
> retrieving revision 2.4
> diff -u -r2.4 verbose.c
> --- verbose.c	10 Oct 2006 09:50:45 -0000	2.4
> +++ verbose.c	26 Oct 2006 07:19:47 -0000
> @@ -18,7 +18,8 @@
>  #include <grass/config.h>
>  #include <stdlib.h>
>  
> -#define MAXLEVEL 2 
> +#define MAXLEVEL 3
> +#define STDLEVEL 2
>  #define MINLEVEL 0
>  
>  
> @@ -32,6 +33,8 @@
>   * \param 0 - module should print nothing but errors and warnings (G_fatal_error, G_warning)
>   * \param 1 - module will print progress information (G_percent)
>   * \param 2 - module will print all messages (G_message)
> + * \param 3 - module will be very verbose. Triggered by "--v".
> + *            "--v" requires if(G_verbose() == G_verbose_max()) tests.
>   */
>  int G_verbose (void)
>  
> @@ -46,7 +49,7 @@
>                  ;
>          }
>          else
> -            verbose = MAXLEVEL;
> +            verbose = STDLEVEL;
>      }
>      return verbose;
>  }

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

-- 
Jachym Cepicky
e-mail: jachym.cepicky at 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 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: 191 bytes
Desc: Digital signature
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20061026/7439657e/attachment.bin


More information about the grass-dev mailing list