Hi, everyone
I’m unable to log a message to an application.log when I do it in ajax-requested action
So I have
public function actionLoad($limit = 5, $lastNoteId = null)
{
Yii::log('ajax','info');
if (Yii::app()->request->isAjaxRequest) {
// echo "something";
}
}
When I run this code via browser, it logs normally, but when I call it through ajax request, there is no log message in application log.
My config is
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'info, error, warning',
),
),
),
So, how to enable logging for ajax request?
I found another topic on the forum about the same problem, but it’s for 1.0.x, while I’m using 1.1.7
That is true, that if I use CWebLogRoute, then ajax logging should be enabled additionally, but what’s with CFileLogRoute? Any file file output will never make ajax request fail!