PHP code example of kop / yii2-logentries

1. Go to this page and download the library: Download kop/yii2-logentries library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kop / yii2-logentries example snippets


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 >>>',
                ],
            ],
        ],
    ],
    ...
];
 php composer.phar