From: Richard Date: 2006-11-28T11:35:06+09:00 Subject: Re: Is there a simply way to get every method log itself before running? Hi Phrogz, Thanks for pointing me to that kernel method. I've got to study the example(s) and construct a few of my own to apply it well. Great job! Again, thanks, Richard Phrogz wrote: > Richard wrote: > > As a Ruby nubie, every once-in-a-while I'd like to write a trace > > function and have every method execute that trace when the method's > > invoked. In that trace function, I'd like to be able, e.g. to write > > the invoked method's name, perhaps more. > > I believe the answer to your question (though I've not done it myself) > lies in set_trace_func > http://phrogz.net/ProgrammingRuby/ref_m_kernel.html#Kernel.set_trace_func > > Which links to an example in: > http://phrogz.net/ProgrammingRuby/ospace.html#tracingyourprogramsexecution