What this solution does
SolverWeb Logger is a module designed for event logging on Bitrix-powered websites. It provides a standard administrative interface and notification capabilities. Integration into custom code requires only a few lines: include the module using CModule::IncludeModule('solverweb.logger'), instantiate a logger for a specific space (e.g., \SolverWeb\Logger::Space('login')), and call the log method with a name and value.
A space functions as an isolated journal for a specific part of the site, such as login, Git operations, exceptions, or Telegram integration. Users may define any custom name. The log value can be passed as a string, array, or object. The module automatically serializes arrays and objects into JSON format, ensuring readable log entries without raw array representations.
Five log levels are supported: info, warning, error, fatal, and success. In the administrative panel, each space is displayed separately. Errors are highlighted, and entries can be filtered by level and name. Administrators can clear the journal or delete the entire space.
The module automatically captures the following system events:
- Logins by selected Bitrix users;
- Unhandled PHP exceptions defined in the .settings.php file;
- Changes to the Git HEAD;
- Appearance of uncommitted files;
- Stalled Bitrix mail events.
The SolverWeb Logger module prevents duplicate entries for exceptions and recurring events using SHA-1 hashing. This ensures that identical error log fragments are not recorded repeatedly. The exception file is processed in chunks, avoiding the need to load the entire content into memory at once.
Delivery settings by severity level are available for each space, supporting email and Telegram notifications. Telegram credentials can be configured once in the general settings. If specific fields remain empty in a given space, the module automatically uses the global values: Chat ID, token, proxy settings, and message template. The proxy is configured via a single string and supports http, https, and socks5 protocols, including login and password within the URL.
Notification delivery does not slow down the website. Calling the log() function immediately saves the record and queues the delivery task. A Bitrix background agent, triggered every minute, then processes the queue. If a delivery fails, the system retries with delays of 1, 5, 15, 60, and 360 minutes, after which the task is marked as failed. The space settings display the queue status, the last error, and the agent's uptime.
A Telegram debug mode is available. When enabled, the module creates a dedicated telegram space to log send attempts, API responses, errors, and proxy connection parameters. These technical records are not sent back to Telegram, preventing the formation of feedback loops.
Logs are retained for 30 days by default. A custom retention period can be assigned to each individual space. Submitted queue jobs are removed after one week.
For background operation, Bitrix agents must be launched via cron. Without this, notifications will remain queued, and Git and exception checks will be blocked.
If “SolverWeb Logger” fits the task, General iT can install the module, configure it and verify the result in the project.