rivet / laravel-logging
Laravel logging channel for Rivet
dev-main
2026-02-16 16:35 UTC
Requires
- php: ^8.2
- illuminate/http: ^10.0|^11.0|^12.0
- illuminate/support: ^10.0|^11.0|^12.0
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0|^10.0
- phpunit/phpunit: ^10.0|^11.0
This package is auto-updated.
Last update: 2026-02-17 01:19:29 UTC
README
Laravel log channel driver for sending logs to Rivet ingest.
Quick Start
- Install the package:
composer require rivet/laravel-logging
- Publish config:
php artisan vendor:publish --tag=rivet-logging-config
- Add a Rivet channel in
config/logging.php:
'channels' => [ 'rivet' => [ 'driver' => 'rivet', 'level' => env('LOG_LEVEL', 'debug'), ], ],
- Configure environment variables:
RIVET_BASE_URL=https://api.rivet.example.com RIVET_INGEST_KEY=rk_<id>.<secret> RIVET_SERVICE=${APP_NAME} RIVET_MODE=sync
Use RIVET_MODE=queue if you want queue-backed delivery.
Validate Installation
Run the built-in diagnostic command:
php artisan rivet:logs:test
This command:
- emits one test log through the selected Laravel channel
- runs one direct Rivet ingest probe
- returns exit code
0on success and1on failure
Command Options
php artisan rivet:logs:test --channel=rivet php artisan rivet:logs:test --sync php artisan rivet:logs:test --verbose
--channel=chooses the Laravel channel used for the emitted test log.--syncbypasses channel emission and runs direct transport diagnostics only.--verboseprints raw transport details (attempts,accepted,sent,error_message).
Troubleshooting
| Failure | Meaning | Checks |
|---|---|---|
400 |
Rivet rejected payload | Validate request payload shape and package/API compatibility. |
401 |
Ingest key rejected | Verify RIVET_INGEST_KEY, rotate key if needed, ensure no whitespace. |
503 |
Rivet temporarily unavailable | Retry later, inspect Rivet status, and keep retries enabled. |
| Timeout / connection error | Network/TLS/proxy connectivity issue | Verify RIVET_BASE_URL, DNS reachability, TLS certs, firewall, and proxy config. |
Notes
- Package config defaults live in
config/rivet-logging.php. - Queue settings use
RIVET_QUEUE_CONNECTIONandRIVET_QUEUE_NAME. - Optional fallback logging channel:
RIVET_FALLBACK_CHANNEL.