This is my log config:
// Preloading 'log' component
'preload'=>array('log'),
// Application components
'components' => array(
// Application Log
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
// Save log messages on file
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning, trace, info',
),
),
),
),
and in my commands class:
class MyconsoleCommand extends CConsoleCommand {
public function run($args){
.......
echo "+++++++++++++\n";
Yii::log('MyconsoleCommand logging....');
//also tried following, but no result
//Yii::log('MyconsoleCommand logging....', 'info');
echo "+++++++++++++\n";
.......
}
}
i can only see the two lines of "+++++++++++++" on the screen without any error. but in my runtime directory, the application.log has no change.
anywhere i did wrongly? thanks so much for the help!