PHPackages                             cesargb/laravel-logs-rotate - 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. cesargb/laravel-logs-rotate

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

cesargb/laravel-logs-rotate
===========================

Rotate files log with compression

2.9.0(3mo ago)2652.6k—9.2%3[1 issues](https://github.com/cesargb/laravel-logs-rotate/issues)MITPHPPHP ^8.2CI passing

Since Jan 31Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/cesargb/laravel-logs-rotate)[ Packagist](https://packagist.org/packages/cesargb/laravel-logs-rotate)[ Docs](https://github.com/cesargb/laravel-logs-rotate)[ RSS](/packages/cesargb-laravel-logs-rotate/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (30)Used By (0)

Rotate Laravel logs files and compress
======================================

[](#rotate-laravel-logs-files-and-compress)

[![tests](https://github.com/cesargb/laravel-logs-rotate/workflows/tests/badge.svg)](https://github.com/cesargb/laravel-logs-rotate/workflows/tests/badge.svg)[![static analysis](https://github.com/cesargb/laravel-logs-rotate/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/cesargb/laravel-logs-rotate/actions/workflows/static-analysis.yml)[![lint](https://github.com/cesargb/laravel-logs-rotate/actions/workflows/lint.yml/badge.svg)](https://github.com/cesargb/laravel-logs-rotate/actions/workflows/lint.yml)[![Latest Stable Version](https://camo.githubusercontent.com/447dec710cc53fd4e09f2f9b1843c27459074f9858e32924066cb400e51a42f1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636573617267622f6c61726176656c2d6c6f67732d726f746174652e737667)](https://packagist.org/packages/cesargb/laravel-logs-rotate)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/d624862b89d9d9ec6e951cb69976aafd11e3fae0d9f9747578db54658628716c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636573617267622f6c61726176656c2d6c6f67732d726f746174652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/cesargb/laravel-logs-rotate/?branch=master)

This package allows you to rotate the Laravel record file with compression. This method is useful if you use logger channel `single` (StreamHandler)

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

[](#installation)

You can install the package via composer:

```
composer require cesargb/laravel-logs-rotate
```

Usage
-----

[](#usage)

At this moment, every day at 00:00 your application executes a schedule to rotate the Laravel record files.

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

[](#configuration)

If you need to change the frequency or another function, you can modify the config file.

You can publish config file with:

```
php artisan vendor:publish --provider="Cesargb\LaravelLog\RotateServiceProvider" --tag=config
```

This is the contents of the published config/rotate.php config file:

```
