我正在尝试将 Airbrake 与我的 drupal 8 项目一起使用,我关注这个 GitHub 页面https://github.com/akalsey/airbrake-drupal
。我创建一个帐户并使用 Composer 安装 Airbrake composer require airbrake/phpbrake
。然后它说我应该将此代码段复制到您的 PHP 应用程序中
$notifier = new Airbrake\Notifier(array(
'projectId' => ****,
'projectKey' => '****'
));
Airbrake\Instance::set($notifier);
$handler = new Airbrake\ErrorHandler($notifier);
$handler->register();
但我不知道我在哪个文件中过去了?有什么帮助吗?