PHPackages                             dmstr/yii2-log - 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. dmstr/yii2-log

ActiveYii2-extension[Logging &amp; Monitoring](/categories/logging)

dmstr/yii2-log
==============

SyslogTarget writes log to syslog.

0.1.0(11y ago)44.8k1BSD-4-ClausePHP

Since Jan 9Pushed 11y ago9 watchersCompare

[ Source](https://github.com/dmstr/yii2-log)[ Packagist](https://packagist.org/packages/dmstr/yii2-log)[ RSS](/packages/dmstr-yii2-log/feed)WikiDiscussions master Synced today

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

Yii 2.0 Framework Log Classes
=============================

[](#yii-20-framework-log-classes)

SyslogTarget writes log to syslog.

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

[](#installation)

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

Run

```
php composer.phar require --prefer-dist dmstr/yii2-log "*"

```

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
    'log'	=> [
        'targets'	=> [
            [
                'class'		=> 'dmstr\log\SyslogTarget',
                'levels'	=> ['error', 'warning', 'info', 'trace'],
                'enabled'	=> true,
                'logVars'	=> ['_GET','_POST'],
            ],
        ],
    ],

```

### Settings

[](#settings)

> Output is currently send via `error_log()` which allows you to capture output from php-fpm in nginx **for development**. This extension was created mainly for development with docker, fig and vagrant.

### Sample output

[](#sample-output)

Start docker container with `fig up` or `docker run`

```
web_1 | 2015/01/09 16:13:36 [error] 52#0: *163 FastCGI sent in stderr: "PHP message: dmstr\log\SyslogTarget::export via error_log() ===
web_1 | PHP message:
web_1 | --- begin ---
web_1 | PHP message: [trace][yii\base\Application::bootstrap] Bootstrap with schmunk42\packaii\Bootstrap::bootstrap()
web_1 | PHP message: [trace][yii\base\Application::bootstrap] Bootstrap with dektrium\user\Bootstrap::bootstrap()
web_1 | PHP message: [trace][yii\base\Module::getModule] Loading module: user
web_1 | PHP message: [trace][yii\base\Application::bootstrap] Bootstrap with schmunk42\giiant\Bootstrap::bootstrap()
web_1 | PHP message: [trace][yii\base\Module::getModule] Loading module: gii
web_1 | PHP message: [trace][yii\base\Application::bootstrap] Bootstrap with schmunk42\markdocs\Bootstrap::bootstrap()
web_1 | PHP message: [trace][yii\base\Application::bootstrap] Bootstrap with yii\log\Dispatcher
web_1 | PHP message: [trace][yii\base\Module::getModule] Loading module: debug
web_1 | PHP message: [trace][yii\base\Application::bootstrap] Bootstrap with yii\debug\Module::bootstrap()
web_1 | PHP message: [trace][yii\base\Application::bootstrap] Bootstrap with yii\gii\Module::bootstrap()
web_1 | PHP message: [trace][yii\web\UrlManager::parseRequest] No matching URL rules. Using default URL parsing logic.
web_1 | PHP message: [trace][yii\web\Application::handleRequest] Route requested: ''

[...]

web_1 | PHP message: [trace][yii\base\View::renderFile] Rendering view file: /app/views/layouts/_modal.php
web_1 | PHP message: [info][application] $_COOKIE = [
web_1 |     'PHPSESSID' => 'xxxxxxxxxxxxxxxx'
web_1 | ]
web_1 |
web_1 | $_SESSION = [
web_1 |     '__flash' => []
web_1 |     '__id' => 1
web_1 |     '__captcha/site/captcha' => 'xxxxxx'
web_1 |     '__captcha/site/captchacount' => 1
web_1 | ]
web_1 | PHP message:
web_1 | --- end ---" while reading upstream, client: 192.168.59.3, server: web, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "docker.local:49177", referrer: "http://docker.local:49177/docs/42-testing.md"

```

###  Health Score

31

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.6% 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

Unknown

Total

1

Last Release

4089d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b4ab2b6685ec71887908ec8cff261a16cd5bb24c69bb8ab52840e220f175f9d?d=identicon)[schmunk](/maintainers/schmunk)

---

Top Contributors

[![marc7000](https://avatars.githubusercontent.com/u/1118837?v=4)](https://github.com/marc7000 "marc7000 (5 commits)")[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (4 commits)")

---

Tags

logyii2extensiontarget

### Embed Badge

![Health badge](/badges/dmstr-yii2-log/health.svg)

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

###  Alternatives

[lav45/yii2-activity-logger

Tools to store user activity log for Yii2

3453.9k](/packages/lav45-yii2-activity-logger)[kriss/yii2-log-reader

Yii2 log reader

1339.0k1](/packages/kriss-yii2-log-reader)

PHPackages © 2026

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