PHP code example of lancoid / yii2-log-viewer

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

    

lancoid / yii2-log-viewer example snippets


return [
    'bootstrap' => ['log-viewer'],
    'modules' => [
        'log-viewer' => [
            'class' => 'lancoid\yii2LogViewer\Module',
            'aliases' => [
                'Api Errors' => '@api/runtime/logs/app.log',
                'Console Errors' => '@console/runtime/logs/app.log',
                'Backend Errors' => '@backend/runtime/logs/app.log',
                'Frontend Errors' => '@frontend/runtime/logs/app.log',
            ],
            'lang' => 'en',
            'accessRoles' => ['admin'],
            'moduleUrl' => 'admin/log-viewer',
            'canDelete' => true,
            'appLayout' => '@frontend/views/layouts/main',
        ],
    ],
];

http://localhost/path/to/index.php?r=log-viewer

http://localhost/log-viewer