承接 200pulse/laravel-log 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

200pulse/laravel-log

最新稳定版本:v0.1.0

Composer 安装命令:

composer require 200pulse/laravel-log

包简介

Laravel logging channel that ships logs to 200Pulse.

README 文档

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

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-23