PHP code example of fabiooak / yii2-log-json

1. Go to this page and download the library: Download fabiooak/yii2-log-json 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/ */

    

fabiooak / yii2-log-json example snippets


'components' => [
    'log' => [
        'targets' => [
            [
                'class' => 'fabiooak\yii2\log\JsonFileTarget',
                'levels' => ['info', 'trace', 'error', 'warning']
            ]
        ]
    ]
]