PHPackages                             alexeevdv/yii2-graylog-target - 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. alexeevdv/yii2-graylog-target

ActiveYii2-extension

alexeevdv/yii2-graylog-target
=============================

Yii2 graylog2 log target

0.2.1(5mo ago)445.2k↓40.8%3MITPHPCI passing

Since Mar 12Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/alexeevdv/yii2-graylog-target)[ Packagist](https://packagist.org/packages/alexeevdv/yii2-graylog-target)[ RSS](/packages/alexeevdv-yii2-graylog-target/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (4)Used By (0)

yii2-graylog-target
===================

[](#yii2-graylog-target)

[![Build Status](https://github.com/alexeevdv/yii2-graylog-target/workflows/build/badge.svg)](https://github.com/alexeevdv/yii2-graylog-target/actions)[![Total Downloads](https://camo.githubusercontent.com/413c5e457c752c73a9b40ad225c540dc56eb11be6ba093b431b4b019a618ca86/68747470733a2f2f706f7365722e707567782e6f72672f616c657865657664762f796969322d677261796c6f672d7461726765742f646f776e6c6f616473)](https://packagist.org/packages/alexeevdv/yii2-graylog-target)[![PHP 7.3](https://camo.githubusercontent.com/ebdf47db6e91607cc8e1a8ea16f4a35122a068c1e3a23b9eb6c9932d602d28ff/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e332d677265656e2e737667)](https://camo.githubusercontent.com/ebdf47db6e91607cc8e1a8ea16f4a35122a068c1e3a23b9eb6c9932d602d28ff/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e332d677265656e2e737667)[![PHP 8.0](https://camo.githubusercontent.com/88f6dc968896e54d607c5dcf1c638b25268d12576e91ba149afb56518ec04b50/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e302d677265656e2e737667)](https://camo.githubusercontent.com/88f6dc968896e54d607c5dcf1c638b25268d12576e91ba149afb56518ec04b50/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e302d677265656e2e737667)[![PHP 8.1](https://camo.githubusercontent.com/fce1492cd36b86256ad3768aca02bd7b73d7275452eb215fb3101ecf098825d6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312d677265656e2e737667)](https://camo.githubusercontent.com/fce1492cd36b86256ad3768aca02bd7b73d7275452eb215fb3101ecf098825d6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312d677265656e2e737667)[![PHP 8.2](https://camo.githubusercontent.com/e30841646aa2c8e0757e9f7aa7f4606053b575f8ef1761fc527c6faddaf383b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322d677265656e2e737667)](https://camo.githubusercontent.com/e30841646aa2c8e0757e9f7aa7f4606053b575f8ef1761fc527c6faddaf383b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322d677265656e2e737667)[![PHP 8.3](https://camo.githubusercontent.com/5ce5eca50a57098a749fbc385bde2fe8fda7e1b2cccb4c982b3a220e117d68e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332d677265656e2e737667)](https://camo.githubusercontent.com/5ce5eca50a57098a749fbc385bde2fe8fda7e1b2cccb4c982b3a220e117d68e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332d677265656e2e737667)[![PHP 8.4](https://camo.githubusercontent.com/753d3bfa4ba1deb084c11d346c1d3b583eb37fc5cadfc8e085ea5e0e7b3af6bd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e342d677265656e2e737667)](https://camo.githubusercontent.com/753d3bfa4ba1deb084c11d346c1d3b583eb37fc5cadfc8e085ea5e0e7b3af6bd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e342d677265656e2e737667)[![PHP 8.5](https://camo.githubusercontent.com/47167691b3c79ebfac07348ef98d3339fd963c2b21dcafeee5db9441effc63f4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e352d677265656e2e737667)](https://camo.githubusercontent.com/47167691b3c79ebfac07348ef98d3339fd963c2b21dcafeee5db9441effc63f4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e352d677265656e2e737667)

Yii2 graylog2 log target

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](https://getcomposer.org/download/).

Either run

```
$ composer require alexeevdv/yii2-graylog-target
```

or add

```
"alexeevdv/yii2-graylog-target": "^0.2"

```

to the `require` section of your `composer.json` file.

Configuration
-------------

[](#configuration)

```
'components' => [
    'log' => [
        'targets' => [
            [
                'class' => alexeevdv\yii\graylog\Target::class,
                'publisher' => [
                    'class' => alexeevdv\yii\graylog\Publisher::class,
                    'categories' => ['application'],
                    'facility' => 'my-application',
                    'transports' => [
                        [
                            'class' => alexeevdv\yii\graylog\transport\UdpTransport::class,
                            'host' => '192.168.1.1',
                            'port' => 1234,
                            'chunkSize' => 4321,
                        ],
                        [
                            'class' => alexeevdv\yii\graylog\transport\TcpTransport::class,
                            'host' => '192.168.1.2',
                            'port' => 1234,
                            'sslOptions' => [
                                'allowSelfSigned' => true,
                                'verifyPeer' => false,
                            ],
                        ]
                    ],
                ],
            ],
        ],
    ],
],
```

Transports
----------

[](#transports)

### UDP transport

[](#udp-transport)

```
$transport = new alexeevdv\yii\graylog\transport\UdpTransport([
    // Host name or IP. Default to 127.0.0.1
    'host' => 'graylog.example.org',
    // UDP port. Default to 12201
    'port' => 1234,
    // UDP chunk size. Default to 8154
    'chunkSize' => 4321,
]);
```

### TCP transport

[](#tcp-transport)

```
$transport = new alexeevdv\yii\graylog\transport\TcpTransport([
    // Host name or IP. Default to 127.0.0.1
    'host' => 'graylog.example.org',
    // TCP port. Default to 12201
    'port' => 12201,
    // SSL options. (optional)
    'sslOptions' => [
        // Default to true
        'verifyPeer' => false,
        // Default to false
        'allowSelfSigned' => true,
        // Default to null
        'caFile' => '/path/to/ca.file',
        // Default to null
        'ciphers' => 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256',
    ],
]);
```

### HTTP transport

[](#http-transport)

```
$transport = new alexeevdv\yii\graylog\transport\HttpTransport([
    // Host name or IP. Default to 127.0.0.1
    'host' => 'graylog.example.org',
    // HTTP port. Default to 12202
    'port' => 12202,
    // Query path. Default to /gelf
    'path' => '/my/custom/greylog',
    // SSL options. (optional)
    'sslOptions' => [
        // Default to true
        'verifyPeer' => false,
        // Default to false
        'allowSelfSigned' => true,
        // Default to null
        'caFile' => '/path/to/ca.file',
        // Default to null
        'ciphers' => 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256',
    ],
]);
```

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance73

Regular maintenance activity

Popularity35

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% 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 ~1236 days

Total

3

Last Release

153d ago

### Community

Maintainers

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

---

Top Contributors

[![alexeevdv](https://avatars.githubusercontent.com/u/597839?v=4)](https://github.com/alexeevdv "alexeevdv (16 commits)")[![forecho](https://avatars.githubusercontent.com/u/1725326?v=4)](https://github.com/forecho "forecho (1 commits)")

---

Tags

yii2targetgrayloggelf

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/alexeevdv-yii2-graylog-target/health.svg)

```
[![Health](https://phpackages.com/badges/alexeevdv-yii2-graylog-target/health.svg)](https://phpackages.com/packages/alexeevdv-yii2-graylog-target)
```

###  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)

PHPackages © 2026

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