Yii Framework Forum: Display log message - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Display log message i once did it but i lost Rate Topic: -----

#1 User is offline   zyphers 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 62
  • Joined: 04-March 10

Posted 27 April 2010 - 03:53 AM

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.
0

#2 User is offline   Vince. 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 432
  • Joined: 29-December 08
  • Location:Los Angeles,CA

Posted 27 April 2010 - 04:27 AM

It will only work if you use render() in your controller.
Vince Gabriel, Lead Developer.
Posted ImagePosted ImagePosted Image
0

#3 User is offline   zyphers 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 62
  • Joined: 04-March 10

Posted 27 April 2010 - 05:22 AM

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?
0

#4 User is offline   zyphers 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 62
  • Joined: 04-March 10

Posted 30 April 2010 - 03:51 AM

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

#5 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,353
  • Joined: 12-October 09
  • Location:Croatia

Posted 30 April 2010 - 08:03 AM

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...
Find more about me.... btw. Do you know your WAN IP?
0

#6 User is offline   zyphers 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 62
  • Joined: 04-March 10

Posted 03 May 2010 - 01:47 AM

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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users