PHPackages                             practo/gelf-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. practo/gelf-php

ActiveLibrary

practo/gelf-php
===============

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

1.0.5(11y ago)137.3k↓36.4%MITPHPPHP ~5.3

Since Dec 19Pushed 10y ago4 watchersCompare

[ Source](https://github.com/practo/gelf-php)[ Packagist](https://packagist.org/packages/practo/gelf-php)[ RSS](/packages/practo-gelf-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (11)Used By (0)

gelf-php
========

[](#gelf-php)

[![Build Status](https://camo.githubusercontent.com/832bbdd0c436be8e170a4273c91f65dd4d245c54dc543d4aa78a8babcd8a590d/68747470733a2f2f7472617669732d63692e6f72672f627a696b6172736b792f67656c662d7068702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/bzikarsky/gelf-php)[![Dependency Status](https://camo.githubusercontent.com/5ba1c5702dfa6ece4cb60bbc5ba4b522490ce5188f2e592b7f506aefa84c5b2f/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3532353931653233363332626163373864303030303034372f62616467652e706e67)](https://www.versioneye.com/user/projects/52591e23632bac78d0000047)[![Code Coverage](https://camo.githubusercontent.com/708e27ed787d6238746da10329391574b44c675d3c236bf239f15229a929bf41/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f627a696b6172736b792f67656c662d7068702f6261646765732f636f7665726167652e706e673f733d36646531646337663134613864303166643134376434326662333431383232623364393964376236)](https://scrutinizer-ci.com/g/bzikarsky/gelf-php/)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/13df9c68644032662dfc46337c22484c3c72bc820d89007db01eb46854c1ccb4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f627a696b6172736b792f67656c662d7068702f6261646765732f7175616c6974792d73636f72652e706e673f733d30306434303330623761333563373561366232376234323663306562353366623233616564326431)](https://scrutinizer-ci.com/g/bzikarsky/gelf-php/)[![SensioLabsInsight](https://camo.githubusercontent.com/8d8d0d80d7cb23ec2dc988de35befd1ed8bed63ca7a4b0f7cf6e1ff0c6e320e2/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f35616161313766322d636334332d343962662d613233652d6363313538356561613363322f6d696e692e706e67)](https://insight.sensiolabs.com/projects/5aaa17f2-cc43-49bf-a23e-cc1585eaa3c2)

A php implementation to send log-files to a gelf compatible backend like [Graylog2](http://graylog2.org/). This library conforms to the PSR standards in regards to structure ([0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md)), coding-style ([1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md), [2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)) and logging ([3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)).

It's a loosely based on the original [Graylog2 gelf-php](https://github.com/Graylog2/gelf-php)and [mlehner's fork](https://github.com/mlehner/gelf-php).

Stable release and deprecation of the original graylog2/gelf-php
----------------------------------------------------------------

[](#stable-release-and-deprecation-of-the-original-graylog2gelf-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
-----

[](#usage)

### Recommended installation via composer:

[](#recommended-installation-via-composer)

Add gelf-php to `composer.json`:

```
"require": {
   // ...
   "graylog2/gelf-php": "~1.0"
   // ...
}

```

Reinstall dependencies: `composer install`

### Examples

[](#examples)

For usage examples, go to [/examples](https://github.com/bzikarsky/gelf-php/tree/master/examples).

License
-------

[](#license)

The library is licensed under the MIT license. For details check out the LICENSE file.

Development &amp; Contributing
------------------------------

[](#development--contributing)

You are welcome to modify, extend and bugfix all you like. :-) In case you want to use the nifty [PhpStorm-IDE](http://www.jetbrains.com/phpstorm/), there is an OSS-license for this project, you can use. Just contact me [@bzikarsky](https://twitter.com/bzikarsky).

### Tools

[](#tools)

1. [composer](http://getcomposer.org), preferably a system-wide installation as `composer`
2. [PHPUnit](http://phpunit.de/manual/current/en/installation.html)
3. Optional: [PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for PSR-X-compatibility checks

### Steps

[](#steps)

1. Clone repository and cd into it: `git clone git@github.com:bzikarsky/gelf-php && cd gelf-php`
2. Install dependencies: `composer install --dev`
3. Run unit-tests: `phpunit`
4. Check PSR compatibility: `phpcs --standard=PSR src tests`

[![Bitdeli Badge](https://camo.githubusercontent.com/c67d1d1d71ead5a6c5b404cd31ec6034bff7a4a1b649422420c9bc10c26af8b8/68747470733a2f2f64327765637a68766c38323376302e636c6f756466726f6e742e6e65742f627a696b6172736b792f67656c662d7068702f7472656e642e706e67)](https://bitdeli.com/free "Bitdeli Badge")

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~49 days

Recently: every ~64 days

Total

7

Last Release

4240d ago

Major Versions

v0.1.0 → v1.0.02013-12-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/b119fba643b82735b22cdf310014776e31e478172b24a687a35bf67638f0e616?d=identicon)[abhinavlal](/maintainers/abhinavlal)

---

Top Contributors

[![abhinavlal](https://avatars.githubusercontent.com/u/445119?v=4)](https://github.com/abhinavlal "abhinavlal (4 commits)")[![mrjgreen](https://avatars.githubusercontent.com/u/2183391?v=4)](https://github.com/mrjgreen "mrjgreen (2 commits)")[![h4cc](https://avatars.githubusercontent.com/u/2981491?v=4)](https://github.com/h4cc "h4cc (1 commits)")[![jacobkiers](https://avatars.githubusercontent.com/u/402504?v=4)](https://github.com/jacobkiers "jacobkiers (1 commits)")

### Embed Badge

![Health badge](/badges/practo-gelf-php/health.svg)

```
[![Health](https://phpackages.com/badges/practo-gelf-php/health.svg)](https://phpackages.com/packages/practo-gelf-php)
```

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[api-platform/metadata

API Resource-oriented metadata attributes and factories

243.5M96](/packages/api-platform-metadata)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[flowwow/cloudpayments-php-client

cloudpayments api client

2188.2k](/packages/flowwow-cloudpayments-php-client)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
