|
Project Information
Links
|
EFirephp enables displaying Yii logs in the FireBug console window. RequirementsInstallation
Usagemain.php configuration file update: [...] // autoloading model and component classes 'import'=>array( 'application.models.*', 'application.components.*', 'application.extensions.firephp.*', ), [...] 'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( array( 'class'=>'CFileLogRoute', 'levels'=>'error, warning', ), array( 'class'=>'EFirephp', 'config'=>array( 'enabled'=>true, 'dateFormat'=>'Y/m/d H:i:s', ), 'levels'=>'error, warning, trace, profile, info', ), ), ), [...] Now any log messages with the levels specified will be shown in the FireBug console. To log your own messages (can help with debugging) you can use: Yii::log('message', 'level', 'category');
Yii::log('anytext', 'trace'); // Shows the stack trace - the first few entries are useful for Yii
Yii::log('Path to file is invalid: '.$path, 'warning'); // Default category is 'application'
Yii::log(array($variables, $to, $be, $shown, $like, $print_r, $output), 'info', 'app.SiteController.Action'); // Useful for showing array contents, just wrap them in array()
|