gpxcat/laravel_log_formatter

There is no license information available for the latest version (1.3) of this package.

自製的 Laravel Log 格式化

Installs: 691

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/gpxcat/laravel_log_formatter

1.3 2024-01-19 02:28 UTC

This package is auto-updated.

Last update: 2025-12-19 06:30:09 UTC


README

Add the .env file:

LOG_CHANNEL=stack
GRAYLOG_URL=10.1.6.38
GRAYLOG_PORT=12201
IFCONFIG_URL=http://10.1.1.188:8080/ip

Add the config to your config/logging.php file:

'stack' => [
    'driver' => 'stack',
    'channels' => ['daily', 'graylog'],
    'ignore_exceptions' => true,
    // ...
],
'daily' => [
    'driver' => 'daily',
    // ...
    'tap' => [\Gpxcat\LaravelLogFormatter\Formatter::class],
    // ...
],
'graylog' => [
    'driver' => 'custom',
    'via' => \Gpxcat\LaravelLogFormatter\GraylogLogger::class,
    'host' => env('GRAYLOG_URL', ''),
    'port' => env('GRAYLOG_PORT', ''),
    'level' => env('LOG_LEVEL', 'debug'),
],