This package allows you to integrate Logz.io into Monolog.
Monolog 1 and Monolog 2 will be supported in different versions:
Monolog Version | Logzio-Monolog Branch |
---|---|
1.0 - 1.25.2 | 0.x |
>= 2.0 | 1.x |
- Monolog 1.x will be supported in this package in all versions of 0.x
- Monolog 2.x will be
Install the latest version with
$ composer require inpsyde/logzio-monolog
<?php
use Monolog\Logger;
use Inpsyde\LogzIoMonolog\Handler\LogzIoHandler;
// create a log channel
$log = new Logger('name');
$log->pushHandler(new LogzIoHandler('<your-token>'));
// add records to the log
$log->warning('Foo');
$log->error('Bar');