yireo / magento2-log-excludes
N/A
Package info
github.com/yireo/Yireo_LogExcludes
Type:magento2-module
pkg:composer/yireo/magento2-log-excludes
Requires
- php: >=8.2 <8.6
- magento/framework: ^103.0.8
- magento/module-backend: ^102.0
- magento/module-config: ^101.2
- magento/module-store: ^101.1
- monolog/monolog: ^3.6
Requires (Dev)
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-30 19:06:05 UTC
README
A Magento 2 module that allows you to prevent certain messages from being written to log. Handy when there is a certain exception message triggered by bots without the need to investigate and without the need to have those messages flooding your logs.
Installation
composer require yireo/magento2-log-excludes bin/magento module:enable Yireo_LogExcludes
Note that this module does not work together with the Yireo Whoops plugin.
Configuration
Navigate in the Magento Admin Panel to Stores > Configuration > Advanced > Yireo LogExcludes and configure the following:
- Allow Excluding Patterns from Logs (
yireo_logexcludes/general/enabled): Disabled by default. - Never Exclude From Level (
yireo_logexcludes/general/min_level): Log records of this level or higher are always written. Default isERROR. Magento logs exceptions with the levelCRITICAL, so to exclude exception messages, chooseALERTorEMERGENCY. Records with the levelEMERGENCYare never excluded. - Exclude Patterns (
yireo_logexcludes/general/patterns): One pattern per line. A log message that contains a pattern anywhere is not written. Each pattern needs at least 6 characters, with a maximum of 50 patterns. Every change is logged as a notice, including the admin user that made it.
Access to this configuration section requires the ACL resource Yireo_LogExcludes::config.
Note that an attacker who knows a pattern can add it to their input to hide their own log messages. Keep patterns specific and keep the minimum level as low as possible.
Upgrading from 1.0
The configuration paths moved from system/yireo_logexcludes/* to yireo_logexcludes/general/*. A data patch migrates existing values. Because the module is now disabled by default, installations that relied on the old default (enabled) need to enable the module again.