logging not working

So I have the following log configuration:


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

'log'=>array(

			'class'=>'CLogRouter',

			'routes'=>array(

				array(

					'class'=>'CFileLogRoute',

					'levels'=>'error',

                    'filter'=>'CLogFilter',

				),

                array(

                    'class'=>'CEmailLogRoute',

                    'levels'=> 'error',

                    'emails'=>'phoneylog@gmail.com',

                    'filter'=> 'CLogFilter',

                ),

			),

		),

but the problem is whenever I call:

Yii::log(‘log error’)

that does not log anything to runtime/application.log

??

try this







    Yii::log('test','error'); //Yii::log('test',CLogger::LEVEL_ERROR);




:lol:

As you can see here, Yii::log() defaults to level info. Comment out the levels specification or add info to it.

/Tommy

Exactly: the second parameter is the level. If you use




Yii::log('test','somelevel');



when you define log, you must set the same level:




    array(

        'class'=>'CFileLogRoute',

        'levels'=>'somelevel',

        'filter'=>'CLogFilter',

    )