Laravel 貌似会覆盖 php.ini 的 error_log 和 log_errors 配置

Laravel貌似会覆盖php.ini的error_log和log_errors配置
你们碰到过这个情况吗?我找了下也没找到laravel哪个地方的设置改变了php的默认日志行为。
不过可以确定的是基于laravel框架的代码出错后不会被php.ini中配置的log文件记录,而是被laravel自带的日志系统记录,但是如果单独访问一个php文件,其中的错位就会被记录到php.ini配置的error_log里面。

哪位大神找到了这个具体的点可以分享,不找出来老惦记这事~

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
讨论数量: 1
Summer

框架初始化时已经利用 set_error_handler([$this, 'handleError']); 注册错误处理器了,

Illuminate/Foundation/Bootstrap/HandleExceptions.php

    /**
     * Bootstrap the given application.
     *
     * @param  \Illuminate\Contracts\Foundation\Application  $app
     * @return void
     */
    public function bootstrap(Application $app)
    {
        $this->app = $app;

        error_reporting(-1);

        set_error_handler([$this, 'handleError']);

        set_exception_handler([$this, 'handleException']);

        register_shutdown_function([$this, 'handleShutdown']);

        if (! $app->environment('testing')) {
            ini_set('display_errors', 'Off');
        }
    }
6年前 评论
argb (楼主) 6年前
argb (楼主) 6年前
Summer

框架初始化时已经利用 set_error_handler([$this, 'handleError']); 注册错误处理器了,

Illuminate/Foundation/Bootstrap/HandleExceptions.php

    /**
     * Bootstrap the given application.
     *
     * @param  \Illuminate\Contracts\Foundation\Application  $app
     * @return void
     */
    public function bootstrap(Application $app)
    {
        $this->app = $app;

        error_reporting(-1);

        set_error_handler([$this, 'handleError']);

        set_exception_handler([$this, 'handleException']);

        register_shutdown_function([$this, 'handleShutdown']);

        if (! $app->environment('testing')) {
            ini_set('display_errors', 'Off');
        }
    }
6年前 评论
argb (楼主) 6年前
argb (楼主) 6年前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!