PHPackages                             wikimart/log4php-graylog2 - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. wikimart/log4php-graylog2

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

wikimart/log4php-graylog2
=========================

Log4php appenders and layouts for compatibility with graylog2

1.0.3(11y ago)0141Apache-2.0PHP

Since Apr 20Pushed 11y ago5 watchersCompare

[ Source](https://github.com/wikimart/log4php-graylog2)[ Packagist](https://packagist.org/packages/wikimart/log4php-graylog2)[ Docs](https://github.com/wikimart/log4php-graylog2)[ RSS](/packages/wikimart-log4php-graylog2/feed)WikiDiscussions master Synced 1mo ago

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

===== About
===========

[](#about)

Copyright (c) 2012-2014 Dmitriy Ulyanov

Here you can find 2 new appenders for log4php: LoggerAppenderAMQP and LoggerAppenderGraylog2. You can pass log messages to Graylog2 or AMQP (RabbitMQ for ex.) using it.

Appender LoggerAppenderGraylog2 can pass messages directly to Graylog2 server. Appender LoggerAppenderAMQP can pass messages to AMQP Server. In this case you can set up yours graylog2 to recieving messages from AMQP.

If you would like to pass messages in GELF format, use special layout: LoggerLayoutGelf

============ Installation
=========================

[](#installation)

---

For composer users

---

1. Add to your composer.json:

```
    {
        "require": {
            "wikimart/log4php-graylog2": ">=1.0.0"
        },
        "repositories": [
            {
                "type": "git",
                "url": "git://github.com/wikimart/log4php-graylog2.git"
            }
        ]
    }
```

2. Run composer.phar update

---

For other users

---

1. Set up your log4php config file (see exampleConfig.xml)
2. Use your new logger:

require 'log4php/Logger.php';
require 'log4php-graylog2/src/main/php/bootstrap.php';

============= Configuration
===========================

[](#configuration)

---

XML

---

```

```

---

PHP

---

```
        array(
            'rootLogger' => array(
                'appenders' => array('MyAMQPAppender', 'MyGraylog2Appender')
            ),
            'appenders' => array(
                'MyAMQPAppender' => array(
                    'class' => 'LoggerAppenderAMQP',
                    'params' => array(
                        'host' => 'example.com',
                        'port' => 5672,
                        'vhost' => '/logs',
                        'login' => 'my_login',
                        'password' => 'my_secret_password',
                        'exchangeName' => 'my_exchange',
                        'routingKey' => 'php_application',
                        'contentType' => 'application/json'
                    ),
                    'layout' => array(
                        'class' => 'LoggerLayoutGelf'
                    )
                ),
                'MyGraylog2Appender' => array(
                    'class' => 'LoggerAppenderGraylog2',
                    'params' => array(
                        'host' => '192.168.1.123',
                        'port' => 12201
                    ),
                    'layout' => array(
                        'class' => 'LoggerLayoutGelf'
                    )
                ),
            ),
        );
```

===== Usage
===========

[](#usage)

```
Logger::configure('exampleConfig.xml', 'LoggerConfigurationAdapterXML');

$myLogger = Logger::getLogger('MyLogger');
$myLogger->debug("Hello world!");
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~118 days

Total

4

Last Release

4057d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e1a53ea8f7fff6cf24be0df8b43e70b1b64ce321694854ac22e5831b4576c49?d=identicon)[KGBcheb](/maintainers/KGBcheb)

---

Top Contributors

[![d-ulyanov](https://avatars.githubusercontent.com/u/3064640?v=4)](https://github.com/d-ulyanov "d-ulyanov (2 commits)")[![WhiteCloud21](https://avatars.githubusercontent.com/u/747281?v=4)](https://github.com/WhiteCloud21 "WhiteCloud21 (2 commits)")[![Jackson88](https://avatars.githubusercontent.com/u/2025620?v=4)](https://github.com/Jackson88 "Jackson88 (1 commits)")

---

Tags

logphplogginggraylog2log4php

### Embed Badge

![Health badge](/badges/wikimart-log4php-graylog2/health.svg)

```
[![Health](https://phpackages.com/badges/wikimart-log4php-graylog2/health.svg)](https://phpackages.com/packages/wikimart-log4php-graylog2)
```

###  Alternatives

[hedii/laravel-gelf-logger

A Laravel package to send logs to a gelf compatible backend like graylog

1333.4M10](/packages/hedii-laravel-gelf-logger)[dulyanov/log4php-graylog2

Log4php appenders and layouts for compatibility with graylog2

1168.0k](/packages/dulyanov-log4php-graylog2)[logtail/monolog-logtail

Logtail handler for Monolog

233.2M3](/packages/logtail-monolog-logtail)[dastra/log4php-kafka

Kafka Appender for Log4Php

1017.0k](/packages/dastra-log4php-kafka)

PHPackages © 2026

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