PHPackages                             touchdesign/logrotate - 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. touchdesign/logrotate

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

touchdesign/logrotate
=====================

Logrotate package

v1.0.0-beta2(5y ago)0331proprietaryPHPPHP &gt;=7.4

Since Nov 2Pushed 5y ago2 watchersCompare

[ Source](https://github.com/touchdesign/logrotate)[ Packagist](https://packagist.org/packages/touchdesign/logrotate)[ Docs](https://github.com/touchdesign/logrotate)[ RSS](/packages/touchdesign-logrotate/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (4)Used By (0)

[![Minimum PHP Version](https://camo.githubusercontent.com/0e9ac047546796cfdbe1423d1f4d91c8f37d2fbb11614a7900bb7686aaa5401f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e342d3838393242462e737667)](https://php.net/)

Logrotate
=========

[](#logrotate)

Linux like log rotate component written in PHP. For example, if you have a simple `logfile.log` you can rotate (move) it to `logfile.log.1` and so on. The source logfile will be truncated. The number of logfiles to keep can controlled with the `$keep` option.

Dependencies
------------

[](#dependencies)

- PHP 7.4 or higher

Install
-------

[](#install)

```
composer require touchdesign/logrotate
```

Usage
-----

[](#usage)

```
$rotate = new RotateWorker(
    (new LogfileLoader('/tmp/logfile.log'))
);

// Note: Keep 3 logfiles archived
$rotate->run(3);

$purge = new PurgeWorker(
    (new LogfileLoader('/tmp/logfile.log'))
);

$purge->run();
```

For more examples take a look at the example folder in this repository.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~48 days

Total

2

Last Release

1966d ago

PHP version history (2 changes)v1.0.0-beta1PHP ^7.2

v1.0.0-beta2PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6de6c3bb3de6d953d0e54302e64c2e23c5abf981e23cd7405e6cacfb3dace6c?d=identicon)[touchdesign](/maintainers/touchdesign)

---

Top Contributors

[![christingruber](https://avatars.githubusercontent.com/u/1124818?v=4)](https://github.com/christingruber "christingruber (77 commits)")

---

Tags

archivefilesystemlinux-likeloglogrotatephpunix-like

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/touchdesign-logrotate/health.svg)

```
[![Health](https://phpackages.com/badges/touchdesign-logrotate/health.svg)](https://phpackages.com/packages/touchdesign-logrotate)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M648](/packages/sylius-sylius)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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