Display log message

Hi,

I tried to display log message at the end of web page.

So I set my config like this.




'preload'=>array('log'),

'log'=>array(

			'class'=>'CLogRouter',

            	'routes'=>array(

                  array(

                    'class'=>'CWebLogRoute',  'levels'=>'trace, info, error, warning',

                  ),

                  array(

                    'class'=>'CProfileLogRoute',  'levels'=>'trace, info, error, warning',

                  ),

                ),

                ),



I think this will work but it’s not. There is none message appear under my web site.

Can someone tell me how can I fix this.

Thanks in advance.

It will only work if you use render() in your controller.

Yes, I do this is sample of how I wrote some action in my controller.




public function actionProductList()

	{

		// do something to get data provider

                $dataProvider = new CActiveDataProvider('product');


                // in the end I called render.

		$this->render('product_list',array(

			'dataProvider'=>$dataProvider,

		));

	}



As you can see I’m trying to put dataProvider to render.

May be I screwed up with some view?

Guys someone help me… I can’t figure out how to get the lag shows up.

Can’t help you without looking at your code…

All you posted is OK, it should work… as you wrote… maybe it’s something in the view…

Try to create some Model/CRUD with yiic and try with that if there are some output…

Alright guys,

It was my fault… again. lol!

Yes everything look fine. I have to do all those thing I do and I have to make sure that…




define('YII_DEBUG',true);

define('YII_TRACE_LEVEL',3); 



…should be in Yii’s index.php.

I’ve already forgot about it until I tried brand new Yii 1.1.2!

Anyway thanks for all of that you done.