Switch off the application log

How can I switch off the application log?

Also anything else that should be switched off when moving the site to live server?

Remove the ‘log’ entry from the preload and the component section of your config file. Also set YII_DEBUG false.

You can also try using Yiilite.php instead of yii.php when moving to live if APC is enabled…

Documentation says, it might help.

i don’t know

Is there a way to disable logging only on selected controllers? Some pages are only small IFRAMEs, and the logging mess up with them. Now I am doing this:




		// disable logging

		foreach (Yii::app()->log->routes as $route)

			$route->enabled=false;



Is there a ‘better’ way to do this?

This is fine (don’t know a better solution). Of course you can put that into a function so you don’t have to insert that snippet all the time.