cirelramostrabajo/plogger
Composer 安装命令:
composer require cirelramostrabajo/plogger
包简介
A simple hello world composer package
README 文档
README
A package to send logs to a server via udp or tcp.
It uses the new Laravel custom log channel introduced in Laravel 5.6.
Table of contents
Installation
Install via composer
composer require litermi/elasticlog
add row in config/app.php
\Cirelramostrabajo\Plogger\ElasticServiceProvider::class
publish config
php artisan vendor:publish --provider="Cirelramostrabajo\Plogger\Providers\ElasticServiceProvider"
Edit config/logging.php to add the new logger logs channel.
return [ 'tcp-logger' => [ 'name' => 'elastic', 'driver' => 'custom', 'via' => \Cirelramostrabajo\Plogger\Services\Logs\SendLogTcpMonolog::class, ], 'udp-logger' => [ 'driver' => 'monolog', 'handler' => \Cirelramostrabajo\Plogger\Services\Logs\SendLogUdpJsonHandler::class, ], ];
Usage
Once you have modified the Laravel logging configuration, you can send log channel via tcp or udp as any Laravel log channel.
Example
LOG_CHANNEL=tcp-logger or LOG_CHANNEL=udp-logger
License
litermi elastic is released under the MIT Licence. See the bundled LICENSE file for details.
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-08-15