PHPackages                             ankane/logstop - 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. ankane/logstop

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

ankane/logstop
==============

Keep personal data out of your logs

v0.2.0(10mo ago)54MITPHPPHP &gt;= 8.1CI passing

Since Aug 22Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/ankane/logstop-php)[ Packagist](https://packagist.org/packages/ankane/logstop)[ RSS](/packages/ankane-logstop/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

Logstop PHP
===========

[](#logstop-php)

🔥 Keep personal data out of your logs

```
$logger->info('Hi test@example.org!');
# Hi [FILTERED]!
```

By default, scrubs:

- email addresses
- phone numbers
- credit card numbers
- Social Security numbers (SSNs)
- passwords in URLs

Works with context as well

```
$logger->info('Hi', ['email' => 'test@example.org']);
# Hi {"email":"[FILTERED]"}
```

Works even when sensitive data is URL-encoded with plus encoding

[![Build Status](https://github.com/ankane/logstop-php/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/logstop-php/actions)

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

[](#installation)

Run:

```
composer require ankane/logstop
```

And add it to your [Monolog](https://github.com/Seldaek/monolog) logger:

```
$logger->pushProcessor(new Logstop\Processor());
```

Options
-------

[](#options)

To scrub IP addresses (IPv4), use:

```
new Logstop\Processor(ip: true);
```

To scrub MAC addresses, use:

```
new Logstop\Processor(mac: true);
```

Disable default rules with:

```
new Logstop\Processor(
    email: false,
    phone: false,
    creditCard: false,
    ssn: false,
    urlPassword: false
);
```

To change context limits, use:

```
new Logstop\Processor(
    maxCount: 150,
    maxDepth: 15
);
```

Notes
-----

[](#notes)

- To scrub existing log files, check out [scrubadub](https://github.com/datascopeanalytics/scrubadub)
- To scan for unencrypted personal data in your database, check out [pdscan](https://github.com/ankane/pdscan)

History
-------

[](#history)

View the [changelog](CHANGELOG.md)

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

[](#contributing)

Everyone is encouraged to help improve this project. Here are a few ways you can help:

- [Report bugs](https://github.com/ankane/logstop-php/issues)
- Fix bugs and [submit pull requests](https://github.com/ankane/logstop-php/pulls)
- Write, clarify, or fix documentation
- Suggest or add new features

To get started with development:

```
git clone https://github.com/ankane/logstop-php.git
cd logstop-php
composer install
composer test
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance66

Regular maintenance activity

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Total

4

Last Release

327d ago

PHP version history (2 changes)v0.1.0PHP &gt;= 8.0

v0.2.0PHP &gt;= 8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/220358?v=4)[Andrew Kane](/maintainers/ankane)[@ankane](https://github.com/ankane)

---

Top Contributors

[![ankane](https://avatars.githubusercontent.com/u/220358?v=4)](https://github.com/ankane "ankane (29 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ankane-logstop/health.svg)

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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