I used this, but I'm sure there is a better way.
Yii::warning('**********************', var_export($category,true));
config/web.php 'log' => [ ... 'flushInterval' => 1, // for debug 'targets' => [ [ ... 'exportInterval' => 1, // for debug - slow ], ], ],
source share