yii2-logentries Logentries log target for Yii2 framework

Yii2 Logentries

  1. Requirements
  2. Installation

Yii2 Logentries (Y2LE) adds a LogentriesTarget class that sends Yii2 log messages to the Logentries log management service.

Latest Stable Version Code Climate Scrutinizer Code Quality Version Eye License

Requirements

  • Yii 2.0
  • PHP 5.4

Installation

The preferred way to install this extension is through Composer.

Either run


or add

``` "kop/yii2-logentries": "dev-master"```

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


## Usage

> Note:
**It works slow!** This log target sends each log entry to the Logentries service in the TCP mode, means it blocks the
further execution of the PHP application. Make sure you understand this before using this log target.

Add Logentries target to your log component config:


```php
return [
    ...
    'components' => [
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                'file' => [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                ],
                'logentries' => [
                    'class' => 'kop\y2le\LogentriesTarget',
                    'levels' => ['error', 'warning', 'info'],
                    'categories' => ['application'],
                    'logToken' => '<<< YOUR KEY HERE >>>',
                ],
            ],
        ],
    ],
    ...
];
```


## Configuration

The log destination is specified via `$logToken` property. Please refer to
[Logentries docs for PHP applications](https://logentries.com/doc/php/) for more details.


## Report

- Report any issues [on the GitHub](https://github.com/kop/yii2-logentries/issues).


## License

**yii2-logentries** is released under the MIT License. See the bundled `LICENSE.md` for details.


## Resources

- [Project Page](http://kop.github.io/yii2-logentries)
- [Packagist Package](https://packagist.org/packages/kop/yii2-logentries)
- [Source Code](https://github.com/kop/yii2-logentries)
1 0
1 follower
0 downloads
Yii Version: 2.0
License: MIT
Category: Logging
Developed by: kop
Created on: Jul 2, 2014
Last updated: 4 years ago

Related Extensions