PHPackages                             silinternational/yii2-jsonsyslog - 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. silinternational/yii2-jsonsyslog

Abandoned → [silinternational/yii2-json-log-targets](/?search=silinternational%2Fyii2-json-log-targets)ArchivedLibrary[Logging &amp; Monitoring](/categories/logging)

silinternational/yii2-jsonsyslog
================================

Yii2 log target for sending data to Syslog as a JSON encoded string

1.0.1(5y ago)25.0k1[1 issues](https://github.com/sil-org/yii2-jsonsyslog/issues)1MITPHPPHP &gt;=5.4.0

Since Aug 19Pushed 5y ago4 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (5)Used By (1)

Yii2-JsonSyslog
===============

[](#yii2-jsonsyslog)

Yii2 log target for sending data to Syslog as a JSON encoded string, useful services such as [Logentries](https://logentries.com/).

Tips
----

[](#tips)

### Only send the JSON content

[](#only-send-the-json-content)

Make sure that the template you define for Logentries in your rsyslog.conf file does not add other content before the `%msg%` data (aside from your Logentries key). For example, do something like this...

```
$template Logentries,"LOGENTRIESKEY %msg%\n"

```

... NOT like this...

```
$template Logentries,"LOGENTRIESKEY %HOSTNAME% %syslogtag%%msg%\n"

```

### Have the log prefix (if used) return JSON

[](#have-the-log-prefix-if-used-return-json)

Example (to be placed into your Yii2 config file's `['components']['log']['targets']` array):

```
[
    'class' => 'sil\log\JsonSyslogTarget',
    'levels' => ['error', 'warning'],
    'except' => [
        'yii\web\HttpException:401',
        'yii\web\HttpException:404',
    ],
    'logVars' => [], // Disable logging of _SERVER, _POST, etc.
    'prefix' => function($message) use ($APP_ENV) {
        $prefixData = array(
            'env' => $APP_ENV,
        );
        if (! \Yii::$app->user->isGuest) {
            $prefixData['user'] = \Yii::$app->user->identity->email;
        }
        return \yii\helpers\Json::encode($prefixData);
    },
],

```

License
-------

[](#license)

This is released under the MIT license (see LICENSE file).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~1947 days

Total

2

Last Release

1978d ago

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/836739aa4f60c754dc9a4a547ebd0c166e4b6e855d9f119df2be5aec92f3a375?d=identicon)[forevermatt](/maintainers/forevermatt)

---

Top Contributors

[![forevermatt](https://avatars.githubusercontent.com/u/6233204?v=4)](https://github.com/forevermatt "forevermatt (14 commits)")

---

Tags

logjsonyii2syslog

### Embed Badge

![Health badge](/badges/silinternational-yii2-jsonsyslog/health.svg)

```
[![Health](https://phpackages.com/badges/silinternational-yii2-jsonsyslog/health.svg)](https://phpackages.com/packages/silinternational-yii2-jsonsyslog)
```

###  Alternatives

[lav45/yii2-activity-logger

Tools to store user activity log for Yii2

3456.3k](/packages/lav45-yii2-activity-logger)

PHPackages © 2026

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