csslowlogroute Log profile entries slower than treshold or more frequent than treshold

  1. Requirements
  2. Usage

This log route logs profile entries slower than provided treshold in seconds or more frequent than provided treshold. It does not show those entries on web page so you can turn it on even on production site (for some time) to debug bottlenecks.


based on standard CFileLogRoute, profile processing took from CProfileLogRoute, should work with every Yii version (tested on 1.1.9)


just extract extension in your application extensions directory and put configuration in your config file:

		array( 'class'=>'ext.CSSlowLogRoute',
			'logSlow'=>3, //log profile entries slower than 3 seconds (you can use decimals here)
			'logFrequent'=>3 //log profile entries which occured more than 3 times

you can also turn on profiling on database queries to get them in slowlog:

4 0
Yii Version: 1.1
License: BSD-2-Clause
Category: Logging
Developed by: Maciej Liżewski
Created on: Feb 7, 2012
Last updated: 12 years ago


show all

Related Extensions