encapsulate function

Encapsulate Function Calls for Logging