I am not able to see the log files in Yii framwork. By default it saves in "protected/runtime". Here is my config in main:
'log'=>array(
'class'=>'CLoCFileLogRoutegRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning, info',
'categories'=>'system.*',
))),
and this is how I'm logging:
Yii::log("Index Checkout", "profile", 'system.web.CController');
Yii::trace('IndexCheckout', 'system.web.CController');
Not getting any error but can't find any log file.
Any idea ? Thanks.
May be something wrong name with your log class CLoCFileLogRoutegRouter
. It should be CLogRouter
'log' => array(
'class' => 'CLogRouter',
'routes' => array(
array(
'class' => 'CFileLogRoute',
'levels' => 'error, warning, info',
'categories'=>'system.*',
),
Even though the question is already answered
Please consider that Yii writes logs after the main script is ended, So if you terminate your script using die() command, you never let Yii write it down. To avoid such problems you should terminate the script using Yii::app()->end() command.
For more information see here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With