What this solution does
SolverWeb Logger is a module designed for event logging on sites running 1C-Bitrix. It provides an administrative panel and a notification system. Integration into custom code requires only including the module via CModule::IncludeModule('solverweb.logger') and instantiating the logger using the \SolverWeb\Logger::Space('login') method.
Logging operates within spaces, which are isolated journals dedicated to specific site sections such as login, Git, Exceptions, or telegram. The space name is chosen by the developer. The value passed to a log entry can be a string, an array, or an object. The module automatically converts arrays and objects into JSON format, preventing unreadable Array entries in the logs.
Each log entry is assigned one of five levels: info, warning, error, fatal, and success. In the administrative panel, spaces are displayed separately. Errors are visually highlighted, and entries can be filtered by level and name. Users can clear the journal or delete the entire space.
The module automatically collects the following system events:
- logins of selected 1C-Bitrix users;
- unhandled PHP exceptions recorded from the file specified in the .settings.php configuration;
- changes to the Git HEAD branch;
- the appearance of files not yet committed;
- stalled 1C-Bitrix mail events.
Duplicate protection for exceptions and recurring events is implemented using SHA-1 hashing. The same error log fragment will not be recorded repeatedly. The module reads the exceptions file in chunks, avoiding loading the entire file into memory at once.
Delivery settings by severity level are available for each space, supporting both email and Telegram notifications. Telegram credentials can be configured once in the global settings. If specific fields are left empty in a particular space, the system automatically uses the global values: Chat ID, token, proxy settings, and message template. The proxy is configured via a single string supporting http, https, and socks5 protocols, including login and password credentials within the connection string.
Notification sending does not slow down the website. Calling the log() function immediately saves the record and queues the delivery task. A Bitrix minute agent then processes the queue and sends messages in the background. If a failure occurs, the system retries with increasing delays of 1, 5, 15, 60, and 360 minutes, after which the task is marked as failed. The space settings display the current queue status, the last error details, and the agent's uptime.
A debug mode for Telegram is available. When enabled, the module creates a dedicated telegram space to log all send attempts, API responses, errors, and proxy connection parameters. These technical records are not sent back to Telegram, preventing message loops.
Logs are retained for 30 days by default. A custom retention period can be assigned to each individual space. Sent queue jobs are cleaned up after one week.
For background operation, Bitrix agents must be launched via cron. Without this, notifications will remain in the queue, and Git and exception checks will not proceed.
For “SolverWeb: Logger”, General iT can perform integration, configuration and a final check after installation.