Background profiling

Hi. I need to do some profiling on the background. I’ve seen


and endProfile exists, but they are intended for displaying the result in the web page. But I need to do this in a production environment, and I don’t want end users to see such information. Is there a way to display profiling information to a specific log file? Or with an extension?


What about to use Yii::log() ?

AFAIK it does not have methods for automatic timing

Use the profiling methods you mentioned. You can configure logging target for it. When using Yii 2 debugger all targets are disabled but it will work for production env.

Oops, sorry, just noticed it’s in Yii 1.1 category. I’m not sure if this is an option in 1.1.

I’ve checked and looks like you can set the logging route for profile as well