New to Yii. Read every relevent post I could find, including Logging and the logging api doc. I cannot get the trace method to fire. 1) I know the app reaches that code because I get a json callback from the external app (using yii as a web service). Last update to application.log was an hour ago when i incorrectly used logVars
2014/01/21 18:37:26 [error] [php] Use of undefined constant logVars - assumed 'logVars' (/Applications/MAMP/htdocs/dashboard/protected/controllers/ApiController.php:93)
So I know I can reach it.
At the beginning of the called method I place
Yii::trace('[ApiController:actionCreate]');
And this is my log routing
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning, log, trace, security',
'filter'=>array(
'class'=>'CLogFilter',
'logUser'=>true,
'logVars' =>array(array('_SERVER','REMOTE_ADDR'),
array('_SERVER', 'REDIRECT_URL'),
'_GET',
'_POST'
),
),
),
array(
'class'=>'CEmailLogRoute',
'levels'=>'error, warning',
'emails'=>'mjstelly@gmail.com', //change for prod
),
),
),
When I examine application.log, there’s no recent logs. I want to log what happens in the method, because my $_POST values are not getting properly assigned, so the app inserts NULLS for everything. What am I doing wrong?