Created
March 15, 2012 14:09
-
-
Save cebe/2044368 to your computer and use it in GitHub Desktop.
yii debug ajax request with CWeblogRoute
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // ... | |
| public function actionXXX() | |
| // ... | |
| $this->beginClip('debug'); | |
| Yii::app()->log->processLogs(null); | |
| Yii::app()->detachEventHandler('onEndRequest',array(Yii::app()->log,'processLogs')); | |
| $this->endClip(); | |
| $this->sendJsonResponse(array( | |
| 'html' => $resultingUsersList . $this->getClips()->itemAt('debug'), | |
| )); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // config file | |
| return array( | |
| 'components'=>array( | |
| 'db' => array( | |
| 'enableParamLogging' => true, | |
| 'enableProfiling' => true, | |
| ), | |
| 'log' => array( | |
| 'routes' => array( | |
| array( | |
| 'class' => 'CWebLogRoute', | |
| 'categories' => 'user.*', | |
| 'categories' => 'user.*, system.db.*', | |
| 'showInFireBug'=>true, | |
| 'ignoreAjaxInFireBug'=>false, | |
| ), | |
| ), | |
| ), | |
| ), | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment