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(1y ago)54MITPHPPHP &gt;= 8.1CI passing

Since Aug 22Pushed 5mo ago1 watchersCompare

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

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

33

—

LowBetter than 72% of packages

Maintenance61

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

373d 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.2B11.5k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M276](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M342](/packages/open-telemetry-sdk)

PHPackages © 2026

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