Laravel望远镜在生产中添加滤镜

时间:2020-07-23 07:07:03

标签: php laravel laravel-6

我在Laravel 6.x上安装了望远镜(https://laravel.com/docs/6.x/telescope)。在Laravel应用中,文件app/Providers/TelescopeServiceProvider.php包含register()方法。存在以下代码。

Telescope::filter(function (IncomingEntry $entry) {

        if ($this->app->isLocal()) {
            return true;
        }

        return $entry->isReportableException() ||
               $entry->isFailedRequest() ||
               $entry->isFailedJob() ||
               $entry->isScheduledTask() ||
               $entry->hasMonitoredTag();
    });

这告诉我,如果env = local,则记录所有条目,如果env = production,则仅记录失败的作业,可报告的异常,失败的请求等。 https://laravel.com/docs/6.x/telescope#filtering-entries

上也提到了

有人知道如何添加过滤器来记录生产中的邮件和作业吗?

0 个答案:

没有答案