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

Hans-Christoph Steiner hans at at.or.at
Wed Mar 9 23:02:05 CET 2011


Ok, finally, its all cooked into a nice, decently-tested series of  
patches against the HEAD of master. This patch set completes a set of  
inter-related things related to the Pd window and the logging  
functions. I think you'll find it a huge improvement. It is a combo of  
work that IOhannes and I recently did.

- completes the post/error/verbose API on the Tcl side
- adds logpost() proc/function for logging at a set level
- adds symbolic labels to the Log: menu numbers
- adds 'pd findinstance' to allow Ctrl/Cmd-clicking or hitting Enter  
on a log message to show which instance generated that message
- makes posting to the log MUCH more efficient due to good integration  
with the Tk loop (i.e. after idle)
- complete buffer of all log messages that is filterable using the  
Log: menu (can filter about 100,000 lines per second on my machine)
- makes the text in the Pd window un-editable but still copy-n-paste- 
able (patch #3)
- separates the idea of the -verbose flag and log level since they are  
different
- adjust the post() statements that should be error statements, like  
"... couldn't create". (patch #4)

https://sourceforge.net/tracker/?func=detail&aid=3204677&group_id=55736&atid=478072

To get an idea of the improvements, try the attached patch on an older  
version of Pd vs a version with these patches applied.

.hc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lotsofmessages.pd
Type: application/octet-stream
Size: 496 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20110309/423678df/attachment.obj>
-------------- next part --------------


On Mar 9, 2011, at 12:32 AM, Miller Puckette wrote:

> Hi all,
>
> Sorry to reopen this old thread -- I think there's a more recent  
> message
> from HC but I can't find it right now.
>
> I wonder if, in the interest of putting 0.43 out, we should just  
> hide the
> verbosity level control and let all printout through for 0.43, then  
> try
> to figure out how to do this correctly for 0.44.  I'm worried that the
> verbosity level and the "verbose" flag (in the search path menu)  
> aren't
> coordinated. and I think they really should be.  We would need to  
> figure
> out whether verbosity can just be a level or should be a bitfield
> (file open attempts, warnings, blah blah).  Also, the filtering almost
> certainly should be done down in Pd, not in the Tcl code, unless  
> there's
> a significant amount of printout coming from the Tcl layer which I  
> think
> there isn't.
>
> I still need to test Pd on a couple more hardware/software  
> combinations,
> but would dearly love to get the damn thing done so I can start  
> working
> on some things I'm delaying for 0.44.
>
> thanks
> Miller
>
>
> On Wed, Feb 23, 2011 at 05:50:56PM -0500, Hans-Christoph Steiner  
> wrote:
>>
>> On Feb 23, 2011, at 5:38 AM, IOhannes m zmoelnig wrote:
>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> On 2011-02-23 09:05, IOhannes m zmoelnig wrote:
>>>> On 2011-02-22 23:26, Hans-Christoph Steiner wrote:
>>>>
>>>>> This would be very nice, I could see being about to double-click  
>>>>> any
>>>>> line in the log and have it pop up which object made the log
>>>>> message.  I
>>>>> won't have time to implement this in the foreseeable future.
>>>>
>>>> well, the thing is that for now we only have to reserve an  
>>>> additional
>>>> variable "objectID" for the logpost(), which could be NULL/empty.
>>>>
>>>> logpost(objectID, level, msg,...)
>>>>
>>>> then, time permitting, fill in the missing code on both the C and  
>>>> the
>>>> tcl side.
>>>>
>>>> i only try to avoid re-defining functions in each release.
>>>>
>>>
>>> anyhow, here is a draft for how this would work (to be applied on
>>> top of
>>> pd-extended.git#fac011b1)
>>>
>>> apart from changing the logpost() functions, it also adds a new  
>>> global
>>> method to Pd that allows for selecting/highlighting an object
>>> based on a
>>> symbolic representation of it's address.
>>>
>>> like alway, most work was spent in trying to figure out things in
>>> tcl :-)
>>
>>
>> Now I'm starting to think that these would be appropriate levels,
>> and use both the number and the name for the Log menu:
>>
>> 0 fatal
>> 1 error
>> 2 normal
>> 3 info
>> ALL
>>
>> .hc
>>
>>
>> ----------------------------------------------------------------------------
>>
>> As we enjoy great advantages from inventions of others, we should be
>> glad of an opportunity to serve others by any invention of ours; and
>> this we should do freely and generously.         - Benjamin Franklin
>>
>>
>>
>> _______________________________________________
>> Pd-dev mailing list
>> Pd-dev at iem.at
>> http://lists.puredata.info/listinfo/pd-dev



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

Mistrust authority - promote decentralization.  - the hacker ethic




More information about the Pd-dev mailing list