I am unable to see my logging message in my Yii application Could you please suggest me how to render the log to the weblog viewer.
Main.php
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
// uncomment the following to show log messages on web pages
array(
'class'=>'CWebLogRoute',
'levels'=>'trace, info, error, warning, vardump',
'categories'=>'system.*',
),
),
method of calling log function
Yii::log('image is converted and upload successfully','trace','system.CModule');
But I can not see my message in the weblogroute. I am using chrome. Do I need to use anyother browser.
do you have ‘log’ component in ‘preload’ section of config file? it is needed for logging mechanism to work properly.
also - you have configured weblogroute - check if action you are calling is not AJAX request which output is hidden. weblogroute will work only for requests that display its output in browser.