/** * @inheritdoc */ public function bootstrap($app) { parent::bootstrap($app); // override the log target with ours $this->logTarget = Yii::$app->getLog()->targets['debug'] = new LogTarget($this); }