On Jan 5, 2009, at 10:11 AM, Malcolm J. Currie wrote:
>
> Mr CUPID might explain the various levels. Are there two CUPID
> levels between NORM and VERB and only one between VERB and DEBUG? I
> notice that FINDBACK only uses two levels 0 or 1. It's FINDCLUMPS
> that has six levels. Does the list need to be in order of
> verbosity? (I've not checked the new C code how it tests.) I'm
> just wondering if we can retain the MERS 1 -> 4. Perhaps it doesn't
> matter as it's parameterised, but applications would need rebuilding
> with the new include file.
>
The C does what the fortran did. It checks for sanity (is the message
level between 1 (QUIET) and 4 (DEBUG)) and then simply sees whether
the current level is greater than or less than the requested level. So
long as we do not mind a little recompilation, rebranding of QUIET as
0 and DEBUG as 6 should not be a problem. What we can't do is keep 1-
>4 and then add a 5 as if it was between NORM and VERB. So the list
does need to be in order of verbosity.
> We might think of better names than say VERB- provided the order is
> obvious from the name,
>
>> and change msgIfget so that it also understands integers (so in
>> that sense ILEVEL could be passed directly to msgIfget).
>
> That's a plan.
it might help David overcome his concerns. I don't really mind
defining QUIET as 0 and DEBUG as 99 and only supporting a few named
levels but many numbered ones. Although using bare integers in the
code would seem like anathema and would prevent us from the
flexibility of simply changing DEBUG back to 10 at some point in the
future.
Maybe we should simply say that message levels are percentages:
QUIET = 0
NORM 33
VERB 66
DEBUG 99
but that doesn't really help the unadorned integers creeping into
MSG_OUTIF calls. We could provide a function that converts a
percentage to whatever the QUIET -> DEBUG range happens to be but
it's still just an unadorned int.
--
Tim Jenness
Joint Astronomy Centre
|