No log for console app

Hi all,

I am writing a console app by using Yii2. By default, the log is configured in config/console.php file, but I can not find any log information in app.log file. Do i need change the default log configuration?

My log section in config/console.php is default setting. Like this:

'components' => [

    'cache' => require(__DIR__ . '/cache.php'),

    'log' => [

        'targets' => [


                'class' => 'yii\log\FileTarget',

                'levels' => ['error', 'warning'],




    'db' => $db,




Config seems to be OK.