a PHP library to record events to fluentd
- PHP 5.4 or higher
- fluentd v0.9.20 or higher
You can install it by composer.
composer require dqneo/fluent-simplelogger
or create composer.json and exec `composer install'
{
"require": {
"dqneo/fluent-simplelogger": "0.0.4"
}
}
<?php
require_once __DIR__ . '/vendor/autoload.php';
use DQNEO\Fluent\Logger;
# If you want to connect by TCP
$logger = new Logger("localhost","24224");
# or If you want to connect by Unix Domain Socket
$logger = new Logger("unix:///var/run/td-agent/td-agent.sock");
$logger->post("debug.test", ["hello"=>"world"]);
- Buffering and re-send support
PHP does not have threads. So, I strongaly recommend you use fluentd as a local fluent proxy.
apache2(mod_php)
fluent-logger-php
`-----proxy-fluentd
`------aggregator fluentd
Apache License, Version 2.0
Original from https://github.com/fluent/fluent-logger-php
- Daniele Alessandri
- Hiro Yoshikawa
- Kazuki Ohta
- Shuhei Tanuma
- Sotaro KARASAWA
- edy
- kiyoto
- sasezaki
- satokoma
- DQNEO