https://github.com/fluent/fluent-logger-php
A structured logger for Fluentd (PHP)
https://github.com/fluent/fluent-logger-php
Last synced: 8 months ago
JSON representation
A structured logger for Fluentd (PHP)
- Host: GitHub
- URL: https://github.com/fluent/fluent-logger-php
- Owner: fluent
- License: other
- Created: 2011-10-10T05:51:52.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2023-04-12T05:35:11.000Z (almost 3 years ago)
- Last Synced: 2025-06-08T16:08:36.585Z (9 months ago)
- Language: PHP
- Homepage:
- Size: 438 KB
- Stars: 216
- Watchers: 41
- Forks: 59
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fluent Logger PHP
**fluent-logger-php** is a PHP library to record events to fluentd from a PHP application.
[](http://travis-ci.org/fluent/fluent-logger-php)
## Requirements
- PHP 5.6 or higher
- fluentd v0.9.20 or higher
## Installation
### Using Composer
composer.json
```json
{
"require": {
"fluent/logger": "v1.0.0"
}
}
```
# Backward Compatibility Changes
As of v1, all loggers but `FluentLogger` are removed.
[Monolog](https://github.com/Seldaek/monolog) is recommended in such use cases.
# Usage
## PHP side
```php
post("debug.test",array("hello"=>"world"));
```
## Fluentd side
Use `in_forward`.
```aconf
@type forward
```
# 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
````
# License
Apache License, Version 2.0
# Contributors
* Daniele Alessandri
* Hiro Yoshikawa
* Kazuki Ohta
* Shuhei Tanuma
* Sotaro KARASAWA
* edy
* kiyoto
* sasezaki
* satokoma
* DQNEO