1

我需要集成 Graylog 数据包。我发现了这个'https://github.com/hedii/laravel-gelf-logger'

这是我的配置文件

配置/日志记录.php

'default' => 'stack',

'channels' => [
    'stack' => [
        'driver' => 'stack',
        'channels' => ['single', 'gelf'],
    ],

    'gelf' => [
        'driver' => 'custom',
        'via' => \Hedii\LaravelGelfLogger\GelfLoggerFactory::class,
        'processors' => [
            \Hedii\LaravelGelfLogger\Processors\NullStringProcessor::class,
            // another processor...
        ],
        'level' => 'debug',
        'name' => 'bms-admin',
        'system_name' => null,
        'transport' => 'udp',
        'host' => '192.168.41.112',
        'port' => '5141',
        'path' => null,
        'max_length' => null,
        'context_prefix' => null,
        'extra_prefix' => null,
    ],

    'single' => [
        'driver' => 'single',
        'path' => storage_path('logs/laravel.log'),
        'level' => 'debug',
    ],

]

当 Laravel 记录一些东西时,我收到了

记录的消息

4

0 回答 0