Laravel 望远镜每分钟记录“列表”控制台命令,无需触发

问题描述 投票:0回答:1

我在本地开发环境中遇到了 Laravel Telescope 的问题,它每分钟都会记录一个名为 list 的控制台命令,即使我的应用程序没有明确触发它。

图片#1 图片#2

环境:

Laravel version: v11.22.0
Laravel Sail for local development in WSL2 (in devcontainer)
Telescope installed only in the local environment
OS: Linux

每分钟,Telescope 都会记录一个列表的控制台命令条目。这使我的日志变得混乱,我无法弄清楚是什么触发了它。我还没有设置任何应该运行此命令的计划任务或 cron 作业。

我搜索了我的应用程序代码,但没有发现对手动执行列表的引用。我还尝试暂时禁用 Telescope,并且日志停止显示该命令,因此它似乎与 Telescope 有关。 我已采取的步骤:

Checked all cron jobs (none related to list)
Verified that no other processes are triggering the list command
Looked through my codebase for possible causes but found nothing

有人遇到过类似的问题,或者有人知道为什么 Telescope 会记录这个问题吗?

php laravel laravel-telescope
1个回答
0
投票

我也有同样的问题。您可以将其添加到 Telescope 配置文件中,这样它就不会显示:

'watchers' => [
    \Laravel\Telescope\Watchers\CommandWatcher::class => [
        'enabled' => env('TELESCOPE_COMMAND_WATCHER', true),
        'ignore' => [
            'list',
        ],
    ],
],
© www.soinside.com 2019 - 2024. All rights reserved.