Problem with logging in a command


I can’t make the logging work in my console application: nothing is logged. I’m using this Yii command:

Yii::trace("cannot init. item: $item->id", CLogger::LEVEL_WARNING, "application.commands.MyCommand");

and my config/console.php is contains a ‘log’ section:










                'levels'=>'trace, info, warning',

                'categories'=>'system.*, application.commands.*',






What’s wrong ? Thank you,


Note that trace() has 2 parameters where the second is category not level -

log() has 3 parameters, where second is level and third category -