inpsyde/logzio-monolog

Logz.io integration for Monolog

Package info

github.com/inpsyde/logzio-monolog

pkg:composer/inpsyde/logzio-monolog

Statistics

Installs: 1 212 857

Dependents: 1

Suggesters: 0

Stars: 18

Open Issues: 3

2.1 2024-07-18 09:49 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT ecc0e72a1a33b237ccaf4aaf793d6dd0bbfcdb97

logloggingmonolog


README

πŸ‘ Latest Stable Version
πŸ‘ Project Status
πŸ‘ Build Status
πŸ‘ License

This package allows you to integrate Logz.io into Monolog.

Monolog support

Monolog 1, 2 and 3 will be supported in different versions:

Monolog Version Logzio-Monolog Branch
1.0 - 1.25.2 0.x
>= 2.0 1.x
>= 3.0 2.x
  • Monolog 1.x will be supported in this package in all versions of 0.x
  • Monolog 2.x will be supported in this package in all versions of 1.x

Installation

Install the latest version with

$ composer require inpsyde/logzio-monolog

Basic Usage

<?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');