rivet/laravel-logging

Laravel logging channel for Rivet

Maintainers

Package info

github.com/ChandlerVS/rivet-laravel-logging

pkg:composer/rivet/laravel-logging

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-02-16 16:35 UTC

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

  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.