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 3w 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 18% 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

2011d ago

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

v1.0.0-beta2PHP &gt;=7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/289021?v=4)[touchdesign](/maintainers/touchdesign)[@touchdesign](https://github.com/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

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k246.0M11.1k](/packages/symfony-framework-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M517](/packages/shopware-core)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M462](/packages/pimcore-pimcore)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[prestashop/prestashop

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

9.1k16.8k](/packages/prestashop-prestashop)

PHPackages © 2026

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