PHPackages                             ensi/laravel-stdout-logs-helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. ensi/laravel-stdout-logs-helper

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

ensi/laravel-stdout-logs-helper
===============================

laravel stdout logs helper

1.0.4(2mo ago)155.6k↓18.2%3MITPHPPHP ^8.1CI passing

Since Aug 18Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/ensi-platform/laravel-stdout-logs-helper)[ Packagist](https://packagist.org/packages/ensi/laravel-stdout-logs-helper)[ RSS](/packages/ensi-laravel-stdout-logs-helper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (13)Used By (0)

Laravel logs helper
===================

[](#laravel-logs-helper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/01a6eb868c98cae09589dafea42687e5439b1c2d96a0a20884dc43516abd7b81/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656e73692f6c61726176656c2d7374646f75742d6c6f67732d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ensi/laravel-stdout-logs-helper)[![Tests](https://github.com/ensi-platform/laravel-stdout-logs-helper/actions/workflows/run-tests.yml/badge.svg?branch=master)](https://github.com/ensi-platform/laravel-stdout-logs-helper/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/9475bcc9dd9d731900d40e2205b3669389501e8cc80fc7c03ed5aedc5d453645/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656e73692f6c61726176656c2d7374646f75742d6c6f67732d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ensi/laravel-stdout-logs-helper)

Package for duplicating laravel logs in stdout

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require ensi/laravel-stdout-logs-helper
```

Version Compatibility
---------------------

[](#version-compatibility)

Laravel logs helperMonologLaravelPHP^0.1.0^2.3^9.0 || ^10.0 || ^11.0^7.3 || ^8.0^0.2.0^2.3^9.0 || ^10.0 || ^11.0^7.3 || ^8.0^0.3.0^2.0 || ^3.0^9.0 || ^10.0 || ^11.0^7.3 || ^8.0^0.4.0^2.0 || ^3.0^9.0 || ^10.0 || ^11.0^8.1^1.0.0^3.0^10.0 || ^11.0 || ^12.0^8.1### Migrate from 0.4 to 1.0

[](#migrate-from-04-to-10)

1. Replace namespace `Ensi\LaravelStdoutLogsHelper` to `Ensi\LaravelLogsHelper`
2. Replace method `LaravelStdoutLogsHelper::makeStdoutChannel` to `LogsConfigMaker::stdout`
3. Replace method `LaravelStdoutLogsHelper::makeStackChannel` to `LogsConfigMaker::stack`
4. Replace method `LaravelStdoutLogsHelper::makeDailyChannel` to `LogsConfigMaker::daily`

Basic usage
-----------

[](#basic-usage)

### LaravelStdoutLogsHelper

[](#laravelstdoutlogshelper)

In order for the channel to turn into a stack with output to stdout, you must register the `stdout_mirror` key in the source config

Example:

```
return LaravelStdoutLogsHelper::addStdoutStacks([
    'default' => env('LOG_CHANNEL', 'stack'),
    'channels' => [
        // manual config
        'daily_1' => [
            'driver' => 'daily',
            'path' => storage_path('logs/laravel.log'),
            'level' => 'debug',
            'days' => 14,
            'stdout_mirror' => true,
        ],
        // or use our helper
        'daily_1' => LogsConfigMaker::daily(storage_path('logs/laravel.log'))
    ],
]);
```

Result:

```
// ...
'channels' => [
    'daily_1:original' => [
        'driver' => 'daily',
        'path' => storage_path('logs/laravel.log'),
        'level' => 'debug',
        'days' => 14,
        'stdout_mirror' => true,
    ],
    'daily_1:stdout' => [
        'driver' => 'monolog',
        'level' => 'debug',
        'handler' => StreamHandler::class,
        'with' => [
            'stream' => 'php://stdout',
        ],
    ],
    'daily_1' => [
        'driver' => 'stack',
        'name' => 'daily_1',
        'channels' => ['daily_1:original', 'daily_1:stdout'],
        'ignore_exceptions' => false,
    ]
],
// ...
```

### DateSizeRotatingFileHandler

[](#datesizerotatingfilehandler)

For a production environment, it can be important that logs are deleted not by date, but by size.
To set up such rotation, use the `DateSizeRotatingFileHandler` class. Setting up a channel in `logger.php` Example:

```
// ...
'channels' => [
    'my:channel' => LogsConfigMaker::dailySize(storage_path('logs/my/channel.log'))
],
// ...
```

To set up size limits (in bytes) use env:

1. LOGS\_ROTATION\_SIZE\_ONE\_FILE - the limit for one file
2. LOGS\_ROTATION\_SIZE\_CHANNEL - the limit for one channel
3. LOGS\_ROTATION\_COUNT\_CHANNEL - the limit for the count of files for one channel
4. LOGS\_ROTATION\_SIZE\_TOTAL - the limit for sum of all channels with handler `DateSizeRotatingFileHandler::class`

For individual channels, you can redefine the limits using the parameter of the `dailySize` method.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

### Testing

[](#testing)

1. composer install
2. composer test

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](.github/SECURITY.md) on how to report security vulnerabilities.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance87

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 72.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~152 days

Recently: every ~96 days

Total

12

Last Release

62d ago

Major Versions

0.4.1 → 1.0.02025-02-24

PHP version history (2 changes)0.1.0PHP ^7.3 || ^8.0

0.4.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8089373?v=4)[Наталия](/maintainers/MsNatali)[@MsNatali](https://github.com/MsNatali)

![](https://avatars.githubusercontent.com/u/7352966?v=4)[Andrey](/maintainers/dimionx)[@DimionX](https://github.com/DimionX)

---

Top Contributors

[![MsNatali](https://avatars.githubusercontent.com/u/8089373?v=4)](https://github.com/MsNatali "MsNatali (31 commits)")[![C0rTeZ13](https://avatars.githubusercontent.com/u/120840631?v=4)](https://github.com/C0rTeZ13 "C0rTeZ13 (4 commits)")[![DimionX](https://avatars.githubusercontent.com/u/7352966?v=4)](https://github.com/DimionX "DimionX (2 commits)")[![CrazyProgg](https://avatars.githubusercontent.com/u/7059744?v=4)](https://github.com/CrazyProgg "CrazyProgg (2 commits)")[![valerialukinykh](https://avatars.githubusercontent.com/u/123940772?v=4)](https://github.com/valerialukinykh "valerialukinykh (2 commits)")[![arrilot](https://avatars.githubusercontent.com/u/2826480?v=4)](https://github.com/arrilot "arrilot (1 commits)")[![koopaTro0pa](https://avatars.githubusercontent.com/u/60116849?v=4)](https://github.com/koopaTro0pa "koopaTro0pa (1 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ensi-laravel-stdout-logs-helper/health.svg)

```
[![Health](https://phpackages.com/badges/ensi-laravel-stdout-logs-helper/health.svg)](https://phpackages.com/packages/ensi-laravel-stdout-logs-helper)
```

###  Alternatives

[guanguans/laravel-exception-notify

Monitor exception and report to the notification channels(Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

14642.7k1](/packages/guanguans-laravel-exception-notify)[rafaellaurindo/laravel-telegram-logging

Send Laravel logs to a Telegram chat via Telegram Bot.

3326.8k](/packages/rafaellaurindo-laravel-telegram-logging)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
