cutesquirrel/datadog-monolog

Datadog integration for Monolog

1.6 2024-07-03 09:20 UTC

This package is auto-updated.

Last update: 2024-11-03 09:59:13 UTC


README

Latest Stable Version Project Status License

This package allows you to integrate datadoghq.com into Monolog. Forked from https://github.com/inpsyde/logzio-monolog.

Installation

Install the latest version with

composer require cutesquirrel/datadog-monolog

Basic Usage

<?php

use Monolog\Logger;
use cutesquirrel\DatadogMonolog\DatadogHandler;

// create a log channel
$log = new Logger('name');
$log->pushHandler(new DatadogHandler('<your-token>'));

// add records to the log
$log->warning('Foo');
$log->error('Bar');