Trace Controller Actions without adding trace()

Hi all,

is there a possibility to simply look what actions are passing the controllers by a tracing mechanism?

So I don’t want to spread trace() statements to all my actions, and I’m not talking about errors or exception, I simply want to look how my application works (which is not so simply with all these ajax stuff :slight_smile:

Is there a way to easy look inside???

(Hopefully I didn’t missed something in the tutorials or discussions, all I have found was related to the logging functions)



You can implement the beforeAction() method in your base controller class to trace all actions, though

sounds a bit odd for me. If it’s an application designed by you, you should know how it works :)

Yep, I’ve added the following:

protected function beforeAction($action) {

	Yii::log('send action: '.$action->controller->id.'.'.$action->id, 'info','');



protected function beforeRender($view) {

	Yii::log('render view: '.$view, 'info','');



And it helped already debugging the behaviour, much more as enabling the "trace" log route!!!

Oh, yes, but this is a typical newbie problem, don’t really understanding how it works. I hope your hint helps me a lot understanding Yii

thank you very much