Is there a way I can set up callbacks on (or automataically log) method parameters, entries, and exits without making explicit calls within each method? I basically want to log this information to my logger class (which is static) without having to do it manually for each method.
Right now I have to call Logger::logEntry() and Logger::logExit() in every method to accomplish this. I would love to not have to do this:
class TestClass { public function tester($arg) { Logger::logEntry(); Logger::info('Parameter $arg => ' . $arg); // Do some stuff... Logger::logExit(); } }
use a wrapper class. this method has the following benefits:
.