<?php
require_once __DIR__.'/vendor/autoload.php';
use Fluent\Logger\FluentLogger;
$logger = new FluentLogger("localhost","24224");
$logger->post("debug.test",array("hello"=>"world"));
Fluentd side
Use in_forward.
<source>
@type forward
</source>
Todos
Stabilize method signatures.
Improve performance and reliability.
Restrictions
Buffering and re-send support
PHP does not have threads. So, I strongaly recommend you use fluentd as a local fluent proxy.
Fluent Logger PHP
fluent-logger-php is a PHP library to record events to fluentd from a PHP application.
Requirements
Installation
Using Composer
composer.json
Backward Compatibility Changes
As of v1, all loggers but
FluentLoggerare removed.Monolog is recommended in such use cases.
Usage
PHP side
Fluentd side
Use
in_forward.Todos
Restrictions
PHP does not have threads. So, I strongaly recommend you use fluentd as a local fluent proxy.
License
Apache License, Version 2.0
Contributors