bilberrry/yii2-fluentd

This package is abandoned and no longer maintained. No replacement package was suggested.

Logging with Fluentd for Yii2

Installs: 3 383

Dependents: 0

Suggesters: 0

Security: 0

Stars: 9

Watchers: 2

Forks: 1

Type:yii2-extension

0.1.1 2016-04-06 10:09 UTC

This package is auto-updated.

Last update: 2023-03-20 05:59:11 UTC


README

Scrutinizer Code Quality Packagist Packagist GitHub license

Logging with Fluentd for Yii2

Installation

You can install this extension with composer.

composer require bilberrry/yii2-fluentd

or add to composer.json

"bilberrry/yii2-fluentd": "0.1"

Usage

Add new log target to your configuration file.

Example configuration
...
'components' => [
    'log' => [
        'traceLevel' => YII_DEBUG ? 3 : 0,
        'targets' => [
            [
                'class' => 'bilberrry\log\FluentdTarget',
                'levels' => ['error', 'warning'], // Log levels
                'host' => 'localhost', // Fluentd host
                'port' => '24224', // Fluentd port
                'options' => [], // Options for Fluentd client
                'tagFormat' => 'app.%level' // Tag format, available placeholders: %date, %timestamp, %level
            ],
        ],
    ],
...

For options list check this source code.