Cfilelogroute - I Don't See Any Logs

Hi,

I am trying to log many things in my application. Here is what I have in my console.php file :


'log'=>array(

	'class'=>'CLogRouter',

	'routes'=>array(

		array(

			'class'=>'CFileLogRoute',

			'categories'=>'report.yesterday.*',

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

			'logFile'=>'yesterday.log',

		),

	),

),

In my command, I have this line :


Yii::log('Reading line number '.$i,'trace','report.yesterday.process');

Unfortunately, I don’t have anything in protected/runtime/yesterday.log. I tried to create the log file by hand, but it doesn’t get filled.

Obviously, I must be missing something but I don’t have any idea why :confused:

What is wrong with my setup ?

Thank you

Hi

Try this first

Yii::log(’’,CLogger::LEVEL_INFO,‘Action called’);

Thanks !

But I found my issue : I didn’t preload the log component !

(thanks to the guys from IRC ! )