practo/gelf-php
最新稳定版本:1.0.5
Composer 安装命令:
composer require practo/gelf-php
包简介
A php implementation to send log-messages to a GELF compatible backend like Graylog2.
README 文档
README
A php implementation to send log-files to a gelf compatible backend like Graylog2. This library conforms to the PSR standards in regards to structure (0), coding-style (1, 2) and logging (3).
It's a loosely based on the original Graylog2 gelf-php and mlehner's fork.
Stable release and deprecation of the original graylog2/gelf-php
This implementation became the official PHP GELF library on 2013-12-19 and is now released as graylog2/gelf-php v1.0.
The old library became deprecated at the same time and it's recommended to upgrade.
Since the deprecated library never got a stable release, we decided keep it available as v0.1. This means:
If you have a project based on the deprecated library but no time to upgrade to version 1.0, we recommend to change your
composer.json as following:
"require": {
// ...
"graylog2/gelf-php": "0.1.*"
// ...
}
After running an additional composer update everything should work as expected.
Usage
Recommended installation via composer:
Add gelf-php to composer.json:
"require": {
// ...
"graylog2/gelf-php": "~1.0"
// ...
}
Reinstall dependencies: composer install
Examples
For usage examples, go to /examples.
License
The library is licensed under the MIT license. For details check out the LICENSE file.
Development & Contributing
You are welcome to modify, extend and bugfix all you like. :-) In case you want to use the nifty PhpStorm-IDE, there is an OSS-license for this project, you can use. Just contact me @bzikarsky.
Tools
- composer, preferably a system-wide installation as
composer - PHPUnit
- Optional: PHP_CodeSniffer for PSR-X-compatibility checks
Steps
- Clone repository and cd into it:
git clone git@github.com:bzikarsky/gelf-php && cd gelf-php - Install dependencies:
composer install --dev - Run unit-tests:
phpunit - Check PSR compatibility:
phpcs --standard=PSR src tests
统计信息
- 总下载量: 37.57k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-10-09