inpsyde/logzio-monolog

Monolog的Logz.io集成

2.1 2024-07-18 09:49 UTC

This package is auto-updated.

Last update: 2024-09-18 10:18:23 UTC


README

Latest Stable Version Project Status Build Status License

此包允许您将Logz.io集成到Monolog中。

Monolog支持

Monolog 1、2和3将分别在不同的版本中得到支持

  • Monolog 1.x将在此包的0.x所有版本中得到支持
  • Monolog 2.x将在此包的1.x所有版本中得到支持

安装

使用以下命令安装最新版本:

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