attlaz / attlaz-monolog
Attlaz integration for Monolog
2.2.2
2026-07-21 14:25 UTC
Requires
- php: >=8.2
- attlaz/client: ^1.16.2
- monolog/monolog: ^3.7
- psr/log: ^2.0 || ^3.0
Requires (Dev)
- ext-json: *
- inpsyde/php-coding-standards: ^1.0.0
- phpunit/phpunit: ^9
README
This package allows you to integrate Attlaz into Monolog.
Installation
Install the latest version with
$ composer require attlaz/attlaz-monolog
Basic Usage
<?php use Monolog\Logger; use Monolog\Level; use Attlaz\Client; use Attlaz\Model\Log\LogStreamId; use Attlaz\AttlazMonolog\Handler\AttlazHandler; $client = new Client(); $client->authWithToken('<your-token>'); // or: $client->authWithClient('<client-id>', '<client-secret>'); $handler = new AttlazHandler($client, new LogStreamId('Vt9HtWRee'), Level::Info); $logger = new Logger('my-channel'); $logger->pushHandler($handler); // Add records to the log $logger->warning('Foo'); $logger->error('Bar');
About
Requirements
- Attlaz Monolog
^2.2works with PHP 8.2 and above - Attlaz Monolog
^2.0works with PHP 8.1 and above - Attlaz Monolog
^1.0works with PHP 7.2 and above - Attlaz Monolog
^0.0works with PHP 5.3 up to 8.1 (No longer maintained)