Logging And Execution Time

Hi,

In my main controller I do some simple logging. Like the user,IP,action,time etc. But I also want to save the page execution time. Well, I get this with:


Yii::getLogger()->getExecutionTime()

But ofcourse the execution time when I write to my log is different (less) the when I echo the execution time in the footer of my page.

How to overcome this?

Ok… I was running the Log actions in the init(). Now I moved this to the afterAction() method. Nice method btw, did now notice this one before, it’s very handy.