200pulse/laravel-log

Laravel logging channel that ships logs to 200Pulse.

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/200pulse/laravel-log

v0.1.0 2025-09-10 14:46 UTC

This package is auto-updated.

Last update: 2025-10-23 15:30:18 UTC


README

Laravel logging channel that ships your application logs to 200Pulse.

Installation

composer require 200pulse/laravel-log

Optionally publish the config:

php artisan vendor:publish --tag=pulse-config

Configuration

Add to your .env:

PULSE_API_KEY=your_tracking_code
PULSE_PROJECT=your_domain_name
PULSE_ENDPOINT=https://your-200pulse-instance.com

Where to find these values:

  • PULSE_API_KEY: This is your domain's tracking code from your 200Pulse domain settings
  • PULSE_PROJECT: Your domain name (e.g., "example.com") for identification in logs
  • PULSE_ENDPOINT: The URL of your 200Pulse installation (e.g., "https://pulse.yourcompany.com")

config/pulse.php is auto-merged and can be published for customization.

Usage

Enable the channel in config/logging.php:

'channels' => [
    // ...
    'pulse' => [
        'driver' => 'custom',
        'via' => \Pulse\LaravelLog\PulseChannel::class,
        'level' => 'debug', // optional
        // overrides (optional):
        // 'endpoint' => env('PULSE_ENDPOINT'),
        // 'api_key' => env('PULSE_API_KEY'),
        // 'project' => env('PULSE_PROJECT'),
        // 'timeout' => 5,
    ],
],

Then log as usual:

use Illuminate\Support\Facades\Log;

Log::channel('pulse')->error('Payment failed', [
    'user_id' => 912,
    'method' => 'Stripe',
]);

Payload example sent to 200Pulse:

{
  "project": "project-xyz",
  "level": "ERROR",
  "message": "Payment failed",
  "context": {"user_id":912, "env":"production", "app":"MyApp", "channel":"pulse"},
  "timestamp": "2025-09-10T13:45:00Z"
}

Test Command

Run a quick connectivity test:

php artisan pulse:test --level=info

Requirements

  • PHP 8.1+
  • Laravel 9, 10, 11, or 12

Notes

  • The handler is best-effort and silently ignores network errors to avoid log recursion.
  • You can override level, endpoint, api_key, project, and timeout per-channel.

License

MIT © 200Pulse