Download the PHP package crasivo/bitrix-monolog without Composer
On this page you can find all versions of the php package crasivo/bitrix-monolog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package bitrix-monolog
✍🏻 Bitrix Monolog
Adapter for the popular Monolog library in 1C-Bitrix & Bitrix24.
Implementation features:
- [x] Simple and quick integration into an existing project
- [x] Flexible configuration (like laravel/symfony)
- [x] Isolation of kernel settings and specific module settings
- [x] Backward compatibility with standard loggers
- [x] Handling critical errors through the exception_handling configuration.
- [x] Quick integration with external services (Graylog, Logstash, Sentry etc).
Minimum requirements for installation:
- 1C-Bitrix kernel version (main):
v20.5.400 - PHP version:
v7.2 - Monolog version:
v2.10
🚀 Quick Start
To use the library, simply install the Composer package via the command:
It is initially assumed that autoload.php is already connected to your project.
If this is not the case, it can be added to one of the following files:
/bitrix/.settings.php/bitrix/.settings_extra.php/local/php_interface/init.php
The service is already pre-configured (default logger).
This is quite enough to start logging messages anywhere in your project.
Access to the logger and other objects is through a separate ServiceLocator class (service locator).
Example of accessing the logger through the service locator:
You can also use the ready-made helper function (alternative):
[!WARNING] Direct call of any method in files such as
.settings.phpcan lead to looping (stack overflow). Keep this in mind during development!
To configure logging of critical errors, it is sufficient to declare the corresponding class.
In the examples folder, you can see examples with settings and using the library.
[!NOTE] More detailed documentation with usage examples will be written and published later. Estimated release date — Q4 2025.
📜 License
This project is distributed under the MIT license. The full text of the license can be read in the LICENSE file.