What this solution does
mcart.logger Logging Module
The mcart.logger module provides a centralized tool for capturing application events. It supports logging levels from debug to emergency in compliance with the PSR-3 standard. The module includes functionality to intercept core Bitrix errors, allowing all logs to be aggregated in one location with flexible configuration.
Supported logging formats:
File logging: logs are written in Laravel style, facilitating error highlighting in IDEs such as PhpStorm. Automatic file rotation: when a file exceeds the specified size limit, the current file is renamed with the .log.old prefix, and new entries are written to a new file. Old file deletion: files older than the specified number of days are automatically removed.
Bitrix Event Log: uses the standard Bitrix log storage. This option is suitable for temporary use but may be limited due to potential table growth.
APM Sentry: integration with the Sentry service for centralized error collection and analysis.
The mcart.logger module provides automatic tracking of exceptions and errors in real time. It generates detailed reports including stack traces, user data, and labels, simplifying application debugging and monitoring.
All logging parameters, such as output formats, file paths, and retention periods, are configured centrally through the module's administrative interface.
The module architecture is built using the Dependency Injection (DI) pattern via ServiceLocator. This allows logging to be integrated into any application class without a hard dependency on the module's implementation. If mcart.logger is removed or disabled, logging points are safely ignored and do not cause errors, ensuring system stability.
This module is designed for centralized event logging in applications based on Bitrix. Additional technical details are available in the README.md file.
General iT can install and configure this module and check how it works on your website.