stormcode/seq-laravel-log
最新稳定版本:v1.6
Composer 安装命令:
composer require stormcode/seq-laravel-log
包简介
stormcode/seq-laravel-log sends log records to a Seq-Server.
README 文档
README
This package provides a SeqHandler for the Monolog library and Laravel Framework. Seq is a log server that runs on a central machine.
Prerequisites
- PHP 8.0 or above.
Installation
Install the latest version with
$ composer require stormcode/seq-laravel-log
Laravel Usage
To config/logging.php add:
'seq' => [ 'driver' => 'monolog', 'handler' => StormCode\SeqMonolog\Handler\SeqHandler::class, 'with' => [ 'serverUri' => env('SEQ_URL'), 'apiKey' => env('SEQ_API_KEY', null), 'level' => Monolog\Logger::DEBUG, 'bubble' => true ], 'formatter' => StormCode\SeqMonolog\Formatter\SeqCompactJsonFormatter::class, 'formatter_with' => [ 'batchMode' => 1, //1 OR 2 ], ],
Then add this to your .env file:
LOG_CHANNEL=seq
SEQ_URL=http://localhost:5341/
SEQ_API_KEY=YOUR_API_KEY
Now you can freely use seq raporting. If you are using many apps in one seq I suggest to add Channel variable while defining API_KEY.
License
This project is licensed under the terms of the MIT license. See the LICENSE file for license rights and limitations.
Thanks
Many thanks to msschl, who created package msschl/monolog-seq-handler and msschl/monolog-http-handler, which this package is based on. This package is only merge of this two packages and upgrade to php ^8.2 with some changes that was needed to make it work.
统计信息
- 总下载量: 4.37k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-12