Is it possible to allow logging at LEVEL_INFO without logging all the SQL queries?
This is what we ended up using.

&lt;?php
    return [
        'components' =&gt; [
            'log' =&gt; [
                'targets' =&gt; [
                    [
                        'class' =&gt; PsrTarget::class,
                        'logger' =&gt; $logger,
                        'levels' =&gt; [YiiLogger::LEVEL_ERROR],
                        'logVars' =&gt; [],
                        'addTimestampToContext' =&gt; true,
                    ],
                    // Split the targets to specifically exclude classes which spam the logs, while
                    // ensuring errors thrown in those classes are still logged.
                    [
                        'class' =&gt; PsrTarget::class,
                        'logger' =&gt; $logger,
                        'levels' =&gt; $logLevels,
                        'except' =&gt; [
                            'yii\base\View::renderFile',
                            'yii\db\Command::*',
                            'yii\db\Connection::*'
                        ],
                        'logVars' =&gt; [],
                        'addTimestampToContext' =&gt; true,
                    ],
                ],
            ],
        ],
    ];