Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A structured logger for Fluentd (PHP)
PHP Ruby

Merge pull request #39 from Alewex/patch-1

Give the README some syntax highlighting
latest commit 3cb481b710
@DQNEO DQNEO authored
Failed to load latest commit information.
examples
src/Fluent postImpl throws no exception
tests minimal test code to reproduce the hhvm bug
.gitignore remove entries for Vagrant and Chef
.travis.yml allow failures for hhvm
LICENSE add license file
README.md Give the README some syntax highlighting
Rakefile bumped up to 0.3.2
composer.json Add phpunit into composer.json & use it on travis
phpunit.xml.dist Updated phpunit.xml.dist to output coverage reports

README.md

Fluent Logger PHP

fluent-logger-php is a PHP library to record events to fluentd from a PHP application.

Build Status

API Document

current version: v0.3.7

Requirements

  • PHP 5.3 or higher
  • fluentd v0.9.20 or higher

Installation

Using Composer

composer.json

{
    "name": "my-project",
    "version": "1.0.0",
    "require": {
        "fluent/logger": "v0.3.7"
    }
}
wget http://getcomposer.org/composer.phar
php -d detect_unicode=0 composer.phar install

copy directory

git clone https://github.com/fluent/fluent-logger-php.git
cp -r src/Fluent <path/to/your_project>

Usage

<?php
// you can choose your own AutoLoader
require_once __DIR__.'/src/Fluent/Autoloader.php';

use Fluent\Logger\FluentLogger;

Fluent\Autoloader::register();

$logger = new FluentLogger("localhost","24224");
$logger->post("debug.test",array("hello"=>"world"));

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.

apache2(mod_php)
fluent-logger-php
                 `-----proxy-fluentd
                                    `------aggregator fluentd

Documentation

fluent-logger-php uses apigen as a document generator. you can install apigen with following commands

pear config-set auto_discover 1
pear install pear.apigen.org/apigen

you can update gh-pages with following command on top directory.

rake fluent:docs
git push origin gh-pages

License

Apache License, Version 2.0

Contributors

  • Daniele Alessandri
  • Hiro Yoshikawa
  • Kazuki Ohta
  • Shuhei Tanuma
  • Sotaro KARASAWA
  • edy
  • kiyoto
  • sasezaki
  • satokoma
Something went wrong with that request. Please try again.