Looking to hire Laravel developers? Try LaraJobs

laravel-logging maintained by rivet

Description
Laravel logging channel for Rivet
Author
Last update
2026/02/16 17:35 (dev-main)
License
Links
Downloads
39
Tags

Comments
comments powered by Disqus

Rivet Laravel Logging

Laravel log channel driver for sending logs to Rivet ingest.

Quick Start

  1. Install the package:
composer require rivet/laravel-logging
  1. Publish config:
php artisan vendor:publish --tag=rivet-logging-config
  1. Add a Rivet channel in config/logging.php:
'channels' => [
    'rivet' => [
        'driver' => 'rivet',
        'level' => env('LOG_LEVEL', 'debug'),
    ],
],
  1. 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 0 on success and 1 on 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.
  • --sync bypasses channel emission and runs direct transport diagnostics only.
  • --verbose prints 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_CONNECTION and RIVET_QUEUE_NAME.
  • Optional fallback logging channel: RIVET_FALLBACK_CHANNEL.