I want to wrap every function call with some logging code. Something that would produce output like:
func1(param1, param2) func2(param1) func3() func4(param
Maybe you could have a function to which you pass the function to execute as a parameter:
function runner(func_to_run) { alert('about to run ' + func_to_run.name); func_to_run(); } function test() { alert ('in test'); } runner(test)