dimitriytiho/devops-health

Devops处理健康服务和日志

v1.0.1 2024-08-15 11:49 UTC

This package is auto-updated.

Last update: 2024-09-15 13:41:32 UTC


README

添加频道

到".env"文件

DEVOPS_SOURCE_TOKEN=TOKEN
LOG_CHANNEL=devopshealth

到"config/logging.php"文件

<?php

return [  
    'channels' => [
    ########################################
        'devopshealth' => [
            'driver' => 'monolog',
            'level' => env('LOG_LEVEL', 'debug'),
            'handler' => \Dimitriytiho\DevopsHealth\Logging\Monolog\LogtailHandler::class,
            'handler_with' => [
                'sourceToken' => env('DEVOPS_SOURCE_TOKEN'),
            ],
        ],
    ########################################
    ],
];

按照https://github.com/shuvroroy/filament-spatie-laravel-health说明启用Health

在Health配置中添加频道

到"config/health.php"文件

return [
  'notifications' => [
  'enabled' => true,
    'notifications' => [
        \Dimitriytiho\DevopsHealth\Notifications\DevopsHealthNotification::class => ['devops_health'],
    ],
  ],
  'notifiable' => Spatie\Health\Notifications\Notifiable::class,
];