Stackdriver log channel for Laravel compatible with Google App Engine.
Inside of Google Cloud you can send logs to Stackdriver without custom driver using env:
LOG_CHANNEL=stderr
LOG_STDERR_FORMATTER=Monolog\Formatter\GoogleCloudLoggingFormatter
-
Install package with
composer require firevel/stackdriver-log-channel
-
Add to
config/logging.php
:
'stackdriver' => [
'driver' => 'custom',
'via' => Firevel\Stackdriver\CreateStackdriverLogger::class,
'level' => 'debug',
],
- Update your
app.yaml
with:
env_variables:
LOG_CHANNEL: stackdriver