New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

stormcode/seq-laravel-log

stormcode/seq-laravel-log sends log records to a Seq-Server.
7,267 1
Install
composer require stormcode/seq-laravel-log
Latest Version:v1.6
PHP:^8.2
Laravel:4 – 11
License:MIT
Last Updated:Dec 12, 2024
Links: GitHub  ·  Packagist
Maintainer: StormCode

Laravel Seq Log Handler

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.

Related Packages

kopitar/laravel-teams-logger

Laravel package for sending configurable messages to Microsoft Teams via the inc...

1,465 2
goedemiddag/betterstack-logs

Monolog handler for Better Stack Logs

544,449 6
edujugon/laravel-log

Simple API to write logs for Laravel.

11,018 19
antaresbr/arrayhandler

A custom PHP array handler based on Laravel's Illuminate/Support/Arr class

6,662 0
ckryo/laravel_handler

laravel 错误处理及错误码管理

564 2

Version History

Version Released PHP Laravel License
v1.6 ^8.2 * MIT
v1.5 ^8.2 * MIT
v1.4 ^8.2 * MIT
v1.3 ^8.2 * MIT
v1.2 ^8.2 * MIT