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里面。

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

《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
讨论数量: 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');
        }
    }
4年前 评论
argb (楼主) 4年前
argb (楼主) 4年前
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');
        }
    }
4年前 评论
argb (楼主) 4年前
argb (楼主) 4年前

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