Giter Club home page Giter Club logo

fluent-logger-php's Introduction

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 Vagrant

Basically, we uses vagrant as a development sandbox.

gem install vagrant --no-ri --no-rdoc
gem install chef --no-ri --no-rdoc
gem install librarian --no-ri --no-rdoc

git clone https://github.com/fluent/fluent-logger-php.git
cd fluent-logger-php
librarian-chef install
vagrant up

# this may take 30 minutes over if you don't have the box.
# this box installed rvm, ruby1.9.3-p392 and fluentd. you can play fluentd and php with this box. enjoy it!
# you can log in to the box with following command `vagrant ssh`

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

fluent-logger-php's People

Contributors

chobid avatar chobie avatar hiroyoshikawa avatar kzk avatar nrk avatar s-edy avatar sasezaki avatar satokoma avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.