cedricziel/l5-appengine-mvm-loghandler

Google AppEngine 管理虚拟机日志处理器

0.0.1 2015-12-18 20:07 UTC

This package is auto-updated.

Last update: 2024-08-28 11:05:22 UTC


README

Dependency Status

Google AppEngine 管理虚拟机日志处理器。

说明

使用 composer 安装包

composer require cedricziel/l5-appengine-mvm-loghandler

bootstrap/app.php 中将 ConfigureLogging 类绑定到自定义实现

$app->singleton(
    Illuminate\Foundation\Bootstrap\ConfigureLogging::class,
    CedricZiel\AppEngineMvmLoghandler\LoggingConfiguration::class
);

通过覆盖 app/Http/Kernel.php 中的 bootstrapers 字段,用自定义实现替换默认的 ConfigureLogging 引导程序

    /**
     * The bootstrap classes for the application.
     *
     * @var array
     */
    protected $bootstrappers = [
        'Illuminate\Foundation\Bootstrap\DetectEnvironment',
        'Illuminate\Foundation\Bootstrap\LoadConfiguration',
        // replace ConfigureLogging
        'CedricZiel\AppEngineMvmLoghandler\LoggingConfiguration',
        'Illuminate\Foundation\Bootstrap\HandleExceptions',
        'Illuminate\Foundation\Bootstrap\RegisterFacades',
        'Illuminate\Foundation\Bootstrap\RegisterProviders',
        'Illuminate\Foundation\Bootstrap\BootProviders',
    ];

以及在 app/Console/Kernel.php

    /**
     * The bootstrap classes for the application.
     *
     * @var array
     */
    protected $bootstrappers = [
        'Illuminate\Foundation\Bootstrap\DetectEnvironment',
        'Illuminate\Foundation\Bootstrap\LoadConfiguration',
        'CedricZiel\AppEngineMvmLoghandler\LoggingConfiguration',
        'Illuminate\Foundation\Bootstrap\HandleExceptions',
        'Illuminate\Foundation\Bootstrap\RegisterFacades',
        'Illuminate\Foundation\Bootstrap\SetRequestForConsole',
        'Illuminate\Foundation\Bootstrap\RegisterProviders',
        'Illuminate\Foundation\Bootstrap\BootProviders',
    ];

.env 中使用日志处理器

APP_LOG=appenginemvm

许可证

MIT 许可证