Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.02 KB

laravel_lumen_v5_6.md

File metadata and controls

36 lines (26 loc) · 1.02 KB

Laravel/Lumen v5.6

bootstrap/app.php

Edit bootstrap/app.php and enable $app->withFacades();.

config/logging.php

Make sure to have a copy of config/logging.php from the Laravel/Lumen-framework 5.6.* framework stored in your project at /config/logging.php. Then you can add the following entry to the channels section in the array below the existing entries.

'channels' => [

    // ( ... )

    'stackdriver' => [
        'driver' => 'custom',
        'via' => CodeInternetApplications\MonologStackdriver\Laravel\CreateStackdriverLogger::class,
        'logName' => 'my-project-log',
        'loggingClientOptions' => [
            'keyFilePath' => '/path/to/service-account-key-file.json',
        ],
        // 'loggerOptions' => [],
        // 'lineFormat' => '%message%',
        // 'entryOptionsWrapper' => 'stackdriver',
    ],
]

.env

Finally, edit .env to update LOG_CHANNEL to stackdriver.

LOG_CHANNEL=stackdriver