[PD-dev] status of verbose() in 0.43?

Hans-Christoph Steiner hans at at.or.at
Tue Feb 22 07:32:31 CET 2011


On Feb 21, 2011, at 5:42 PM, Hans-Christoph Steiner wrote:

>
> On Feb 16, 2011, at 4:26 AM, IOhannes m zmoelnig wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 2011-02-16 04:53, Hans-Christoph Steiner wrote:
>>>
>>> Do you remember why those "incr 4" and "level+4" are there to begin
>>
>> yes, so that "verbose(0," is not the same as "error("
>>
>>> with?  I think removing that is the best solution,
>>
>> the duplication should be removed.
>>
>>> and then leave 0-5
>>> levels.  That way 5=all.
>>
>> i don't think so.
>> "verbose(3," should have higher priority than "verbose(6,"
>>
>> even if nobody uses such high verbosity levels now (at least i don't
>> know any use cases), "all" should be ALL, and not <=5.
>>
>> it's a conceptual difference, and we shan't mingle our ideas with  
>> what
>> might be practical with conceptual differences
>> (ah, it's still early in the morning; forgive my pompousness)
>
>
> So how about this:
>
> - keep verbose() as it is
> - add logpost(level, message) to both Tcl and C
> - change ::pdwindow::post to mirror the C post() i.e. remove level
> - remove ::pdwindow::fatal, ::pdwindow::warn, ::pdwindow::info since  
> they are not used anywhere
> - keep ::pdwindow::post ::pdwindow::error ::pdwindow::bug


I just pushed to pd-extended.git a reworking of the Pd window and the  
post code, adding logpost() and dynamic updating of the log level.  It  
now keeps all messages in a buffer, then when you select a loglevel  
from the Pd window, it'll clear the Pd window and refilter the whole  
log based on the new log level.  In the process I found some tweaks  
that make things run much faster when posting lots of messages, so  
that's nice.  It also includes all of the changes above except the  
"remove" one.

I'd like to refactor this into something for Pd 0.43. Miller,  
IOhannes, what do you think?

.hc




----------------------------------------------------------------------------

"[T]he greatest purveyor of violence in the world today [is] my own  
government." - Martin Luther King, Jr.






More information about the Pd-dev mailing list