hello,As is often the case, I have never used this technique, but have read about it:
I want to investigate on a regular base the flow of my Python (most of them
using wxPython) programs.
So I want to have some log facilty, that logs things like
- every time a function / method is called
- the time spent in that function / method (or even better start / finish
time)
- in case the function / method has some predefined variables, the values of
these variables
- the caller
As an extra condition, I'm only interested in my own program modules
(located in a specific subdirectory).
Is there a module available that can perform such a task ?
Any hints to get started ?
thanks,
Stef Mientki
You may want to investigate a logging decorator. Python's Decorator
module has a decorator factory that should allow you to log at least
the calls. I'm not sure it would help you much with the time the
method took, but I could very well be wrong about that.
--
Stand Fast,
tjg. [Timothy Grant]