in reply to Dynamic function dispatching...

the Memoize module creates caching for arbitrary functions. You may be able to modify it to be a Logger package that automatically rewraps your functions to provide logging.