ensi/laravel-stdout-logs-helper

laravel stdout logs helper

0.4.0 2024-06-26 10:35 UTC

This package is auto-updated.

Last update: 2024-06-27 08:30:43 UTC


README

Laravel stdout logs helper

Latest Version on Packagist Tests Total Downloads

Package for duplicating laravel logs in stdout

Installation

You can install the package via composer:

composer require ensi/laravel-stdout-logs-helper

Version Compatibility

Laravel stdout logs helper Monolog PHP
^0.1.0 ^2.3 ^7.3 || ^8.0
^0.2.0 ^2.3 ^7.3 || ^8.0
^0.3.0 ^2.0 || ^3.0 ^7.3 || ^8.0
^0.4.0 ^2.0 || ^3.0 ^8.1

Basic usage

Example:

return LaravelStdoutLogsHelper::addStdoutStacks([
    'default' => env('LOG_CHANNEL', 'stack'),
    'channels' => [
        'daily' => LaravelStdoutLogsHelper::makeDailyChannel(storage_path('logs/laravel.log')),
        'checkout' => LaravelStdoutLogsHelper::makeDailyChannel(storage_path('logs/checkout.log'), 3)
    ],
]);

Contributing

Please see CONTRIBUTING for details.

Testing

  1. composer install
  2. composer test

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

The MIT License (MIT). Please see License File for more information.