fluent-logger-php is a PHP library, to record the events to fluentd from PHP application.
- PHP 5.3 higher
- fluentd v0.9.20 higher
composer.json
{
"name": "my-project",
"version": "1.0.0",
"require": {
"fluent/logger": "master-dev"
}
}
wget http://getcomposer.org/composer.phar
php -d detect_unicode=0 composer.phar install
git clone https://github.com/fluent/fluent-logger-php.git
cp -r src/Fluent <path/to/your_project>
this library will be able to install via pear command soon.
<?php
// you can choose your own AutoLoader
require_once __DIR__.'/src/Fluent/Autoloader.php';
use Fluent\Logger\FluentLogger;
Fluent\Autoloader::register();
$logger = FluentLogger::open("debug.test","localhost","24224");
$logger->post(array("hello"=>"world"));
- stabilized method signature.
- improve performance and reliability.
- buffering and re-send support
basically, php does not have thread feature. so i strongaly recommend to use fluentd as a local fluent proxy.
apache2(mod_php)
fluent-logger-php
`-----proxy-fluentd
`------aggregater fluentd
Apache License, Version 2.0
- Daniele Alessandri
- Shuhei Tanuma
- sasezaki