-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2012-02-28 04:32, Hans-Christoph Steiner wrote:
On Mon, Feb 27, 2012, at 22:30, IOhannes m zmölnig wrote:
On 02/27/12 19:34, Hans-Christoph Steiner wrote:
If post(), error(), etc. are your examples, then verbose() should have no level argument, just the fmt, then it could post at level 4. That makes sense to me. If verbose() is meant to post messages at varying levels, then it should use the same numbering scheme as everything else, i.e.
it's the other way round. if you insist on that, then logpost() should have the same numbering scheme as everything else: logpost(0)==post() logpost(1)==verbose(1) logpost(-1)==error()
I don't think a numbering range from -2 to 2 makes much sense, like you suggest here. Programmers start counting from 0, not -2. You might want to double-check the code if you are wondering how everything else works:
that is entirely not the point [*]
you suggest that "loglevel "does it right, whereas "verbose" is the odd player here. my point was that it is not. all the problems come from trying to force verbose() into the loglevel() syntax, and finding that it has a different bias. neither loglevel() nor verbose() have the 'right' bias. unfortunately the 2 biases are different.
src/s_print.c static void dopost(const char *s) { ... sys_vgui("::pdwindow::post {%s}\n", strnescape(upbuf, s, MAXPDSTRING));
tcl/pdwindow.tcl proc ::pdwindow::post {message} {logpost {} 2 $message}
proc ::pdwindow::verbose {level message} { incr level 4 logpost {} $level $message
afaik, "::pdwindow::verbose" is nowhere used on the C-side (you might want to double-check the code)
The numbers on the Pd window are 0 - 4 and the verbose proc uses "incr
what do those numbers prove? how come you think those numbers normative (apart from you being involved in their introduction and you not being involved in verbose()-levels?)
mfgasdr IOhannes
[*] btw, with "programmers start counting at 0" you imply that they only count in one direction. i was not suggesting that the numbering range is - -2..+2 but rather than "0" is the _default_ post level and lower numbers are more important than higher numbers. this allows for more error levels (grave, critical, fatal, atomic,...). all negative numbers would be errors, while all positive numbers would be infos. in linux you have a similar scheme with process priorities (where negative numbers denote realtime priorities)