I need to create a log file that logs calls to a certain API. The
obvious way to do this is to put a bunch of output functions
before/after calls but it seems to me that there should be a generic
way to do this. Perhaps some way to override or use boost::function so
that you just wrap up your function in one of these function logging
objects and then invoke it...it does the rest. That is the kind of
thing I am looking for.
Anyone got any great ideas how to do this? The one I have involves
figuring out how function works and sort of recreating that
functionality I would need to make this work. I'm lazy enough to want
to find an easier way.