PHPackages                             3brs/sylius-404-log-plugin - 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. 3brs/sylius-404-log-plugin

ActiveSylius-plugin[Logging &amp; Monitoring](/categories/logging)

3brs/sylius-404-log-plugin
==========================

404 log plugin for Sylius

v2.2.0(3mo ago)099↓66.7%MITPHPPHP ^8.2

Since Aug 12Pushed 3mo agoCompare

[ Source](https://github.com/3BRS/sylius-404-log-plugin)[ Packagist](https://packagist.org/packages/3brs/sylius-404-log-plugin)[ RSS](/packages/3brs-sylius-404-log-plugin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (47)Versions (10)Used By (0)

 [ ![](https://camo.githubusercontent.com/bb0c16caf210bea68e0e59fc11e0844dc47097f9aeb8b388c3de5f1414d4d1c0/68747470733a2f2f33627273312e667261312e63646e2e6469676974616c6f6365616e7370616365732e636f6d2f336272732f6c6f676f2f334252532d6c6f676f2d73796c6975732d3230302e706e67) ](https://www.3brs.com)

404 Log Plugin
 [ ![](https://camo.githubusercontent.com/a7c2d024b700b788d2904891be5ecb5a9671e2c7bbf4d0011296258e02ac7a23/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f336272732f73796c6975732d3430342d6c6f672d706c7567696e2e737667) ](https://packagist.org/packages/3brs/sylius-404-log-plugin "License") [ ![](https://camo.githubusercontent.com/075cce0bd30d188de4a60646e65da453f9132c345de6829adb4e453d3cc11408/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f336272732f73796c6975732d3430342d6c6f672d706c7567696e2e737667) ](https://packagist.org/packages/3brs/sylius-404-log-plugin "Version") [ ![](https://camo.githubusercontent.com/a8091d28d699a693c3212bc6ba39b8433df78f0bace995eea2dc00d04b7170d3/68747470733a2f2f636972636c6563692e636f6d2f67682f334252532f73796c6975732d3430342d6c6f672d706c7567696e2e7376673f7374796c653d736869656c64) ](https://circleci.com/gh/3BRS/sylius-404-log-plugin "Build status")
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#404-log-plugin------------------------------------------------)

Features
--------

[](#features)

- **404 Error Logging** - Automatically logs all 404 errors with detailed information
- **Smart Filtering** - Configurable patterns to skip logging for admin, API, and static files
- **Aggregated View** - Groups identical URLs with occurrence count and timestamps
- **Detailed Analytics** - View statistics, trends, and individual log entries
- **Multi-language Support** - Available in 8 languages (EN, CS, SK, PL, DE, FR, IT, ES)
- **Admin Integration** - Seamless integration into Sylius admin panel
- **Redirect Plugin Integration** - Works perfectly with [setono/sylius-redirect-plugin](https://github.com/Setono/SyliusRedirectPlugin) for complete 404 error management

Screenshots
-----------

[](#screenshots)

The plugin adds a new "404 Logs" section to your Sylius admin panel where you can:

- See detailed information for each URL

[![](doc/logs.png)](doc/logs.png)

- View aggregated 404 errors with occurrence counts
- Delete logs for specific URLs
- Filter by domain, URL path, and occurrence count

[![](doc/aggregated.png)](doc/aggregated.png)

- View error statistics and trends

[![](doc/detail.png)](doc/detail.png)

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

[](#installation)

1. Run `composer require 3brs/sylius-404-log-plugin`.
2. Register `\ThreeBRS\Sylius404LogPlugin\ThreeBRSSylius404LogPlugin` in your Kernel.
3. Import the plugin configuration in your `config/packages/_sylius.yaml`: ```
        - { resource: "@ThreeBRSSylius404LogPlugin/Resources/config/config.yaml" }
    ```
4. Import the plugin routes in your `config/routes.yaml`: ```
    three_brs_sylius_404_log_plugin:
        resource: "@ThreeBRSSylius404LogPlugin/Resources/config/routes.yaml"
    ```
5. Create and run doctrine database migrations: ```
    bin/console doctrine:migrations:diff
    bin/console doctrine:migrations:migrate
    ```

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

[](#configuration)

### Skip Patterns

[](#skip-patterns)

By default, the plugin skips logging for certain URL patterns to avoid noise. You can customize this behavior in your `config/services.yaml`:

```
parameters:
    # Override default skip patterns
    three_brs_sylius_404_log_plugin.skip_patterns:
        - '/admin'        # Admin section
        - '/api'          # API endpoints
        - '/_'            # Symfony profiler
```

**Disable filtering (log everything):**

```
parameters:
    three_brs_sylius_404_log_plugin.skip_patterns: []
```

Supported Languages
-------------------

[](#supported-languages)

The plugin includes translations for:

- 🇬🇧 English (en)
- 🇨🇿 Czech (cs)
- 🇸🇰 Slovak (sk)
- 🇵🇱 Polish (pl)
- 🇩🇪 German (de)
- 🇫🇷 French (fr)
- 🇮🇹 Italian (it)
- 🇪🇸 Spanish (es)

Usage
-----

[](#usage)

After installation, navigate to your Sylius admin panel. You'll find a new "404 Logs" menu item that provides:

1. **Aggregated Log View** - Overview of all unique 404 URLs with occurrence counts
2. **Detailed Log View** - Individual log entries with timestamps and user agent information, view trends and statistics over time
3. **Filtering &amp; Search** - Filter logs by domain, URL path, and occurrence count

### Console Commands

[](#console-commands)

#### Log Cleanup Command

[](#log-cleanup-command)

The plugin provides a console command to clean up old 404 logs automatically. This is useful for maintaining database performance and preventing excessive storage usage.

```
php bin/console three-brs:404-logs:cleanup [days] [options]
```

**Arguments:**

- `days` - Number of days to keep logs (older logs will be deleted)

**Options:**

- `--dry-run` - Show what would be deleted without actually deleting
- `--batch-size=N` - Number of records to delete in each batch (default: 1000)

**Examples:**

```
# Delete logs older than 30 days
php bin/console three-brs:404-logs:cleanup 30
```

Integration with Redirect Plugins
---------------------------------

[](#integration-with-redirect-plugins)

### Setono Sylius Redirect Plugin

[](#setono-sylius-redirect-plugin)

> **Note:** The [setono/sylius-redirect-plugin](https://packagist.org/packages/setono/sylius-redirect-plugin) is currently not available for Sylius 2.0. For Sylius 2.0 compatibility, please check the package page for updates or consider alternative redirect solutions.

This plugin works excellently together with [setono/sylius-redirect-plugin](https://packagist.org/packages/setono/sylius-redirect-plugin) to provide a complete 404 error management solution.

**Why combine both plugins?**

- **404 Log Plugin**: Identifies which URLs are generating 404 errors
- **Setono Redirect Plugin**: Allows you to create redirects for those problematic URLs

**Recommended workflow:**

1. **Monitor 404 errors** using this plugin to identify frequently accessed broken URLs
2. **Create redirects** in the Setono Redirect Plugin admin panel for important URLs
3. **Track effectiveness** by monitoring if 404 occurrences decrease after implementing redirects

**Installation of Setono Redirect Plugin:**

```
composer require setono/sylius-redirect-plugin
```

**Integration benefits:**

- **Data-driven redirects**: Use 404 logs to prioritize which redirects to create
- **SEO improvement**: Fix broken links that hurt search engine rankings
- **Better UX**: Automatically redirect users to relevant content instead of showing 404 errors
- **Analytics**: Monitor redirect effectiveness by tracking 404 reduction

**Best practices when using both plugins:**

1. **Review 404 logs weekly** to identify new broken URLs
2. **Create redirects for high-traffic 404 URLs** (URLs with many occurrences)
3. **Use meaningful redirect targets** based on URL similarity or content relevance
4. **Monitor redirect performance** by checking if specific URLs stop appearing in 404 logs

Development
-----------

[](#development)

### Usage

[](#usage-1)

- Create symlink from .env.dist to .env or create your own .env file
- Develop your plugin in `/src`
- See `bin/` for useful commands

### Testing

[](#testing)

After your changes you must ensure that the tests are still passing.

```
$ composer install
$ bin/console doctrine:schema:create -e test
$ bin/phpstan.sh
$ bin/ecs.sh
```

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

[](#contributing)

We welcome contributions! Please feel free to submit pull requests or open issues for bugs and feature requests.

License
-------

[](#license)

This library is under the MIT license.

Credits
-------

[](#credits)

Developed by [3BRS](https://3brs.com)

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance86

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.2% 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 ~28 days

Recently: every ~41 days

Total

7

Last Release

102d ago

Major Versions

v1.1.2 → 2.0.02025-10-09

PHP version history (2 changes)v1.1.0PHP ^8.1

2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/ab23998c28b111996e4b3357f20929d6904a97ac21724750e1dfafd6a09791e4?d=identicon)[ondrej-kuhnel](/maintainers/ondrej-kuhnel)

---

Top Contributors

[![ondrej-kuhnel](https://avatars.githubusercontent.com/u/6840281?v=4)](https://github.com/ondrej-kuhnel "ondrej-kuhnel (13 commits)")[![jaroslavtyc](https://avatars.githubusercontent.com/u/2290225?v=4)](https://github.com/jaroslavtyc "jaroslavtyc (11 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/3brs-sylius-404-log-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/3brs-sylius-404-log-plugin/health.svg)](https://phpackages.com/packages/3brs-sylius-404-log-plugin)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.1k](/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.2M137](/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)
