PHPackages                             daz9e/laravel-log-compressor - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. daz9e/laravel-log-compressor

ActiveLibrary[File &amp; Storage](/categories/file-storage)

daz9e/laravel-log-compressor
============================

Lets you compress .log files in your laravel app by command or schedule.

1.3(9mo ago)0354MITPHPPHP ^7.4|^8.0

Since Jul 23Pushed 9mo agoCompare

[ Source](https://github.com/daz9e/laravel-log-compressor)[ Packagist](https://packagist.org/packages/daz9e/laravel-log-compressor)[ RSS](/packages/daz9e-laravel-log-compressor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Log Compression Command
=======================

[](#log-compression-command)

Usage
-----

[](#usage)

Run the command to compress log files older than a specified number of days and delete old compressed logs.

```
php artisan logs:compress [days]
```

- **`days`** (optional): Number of days to keep logs uncompressed. Defaults to `LOG_COMPRESS_DAYS` in `.env` or `2` days.

### Example

[](#example)

```
php artisan logs:compress 5
```

Compresses logs older than 5 days and deletes `.gz` files older than 14 days (configurable in `config/logging.php`).

Configuration
-------------

[](#configuration)

In `config/logging.php`:

- **`compress_days`**: Days to keep logs uncompressed (default: `2`). Override via `.env`: ```
    LOG_COMPRESS_DAYS=5
    ```
- **`logging.channels.daily.days`**: Retention period for compressed logs (default: `14` days).

Scheduling
----------

[](#scheduling)

Scheduled to run daily in `routes/console.php`:

```
Schedule::command('logs:compress')->daily();
```

Ensure the Laravel scheduler is set up:

```
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance57

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

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 ~1 days

Total

4

Last Release

287d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ad1e12cb544bfce8b443e0d8882e62df7632c65f72baa13711702be30ae8188?d=identicon)[daz9e](/maintainers/daz9e)

### Embed Badge

![Health badge](/badges/daz9e-laravel-log-compressor/health.svg)

```
[![Health](https://phpackages.com/badges/daz9e-laravel-log-compressor/health.svg)](https://phpackages.com/packages/daz9e-laravel-log-compressor)
```

###  Alternatives

[overtrue/laravel-filesystem-qiniu

A Qiniu storage filesystem for Laravel.

482229.7k16](/packages/overtrue-laravel-filesystem-qiniu)[rahulhaque/laravel-filepond

Use FilePond the Laravel way

261114.4k2](/packages/rahulhaque-laravel-filepond)[overtrue/laravel-filesystem-cos

A Cos storage filesystem for Laravel.

92128.4k7](/packages/overtrue-laravel-filesystem-cos)

PHPackages © 2026

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