PHP code example of dhavalbhavsar / laravel-request-logger

1. Go to this page and download the library: Download dhavalbhavsar/laravel-request-logger 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/ */

    

dhavalbhavsar / laravel-request-logger example snippets


'providers' => array(
    ...,
    'Prettus\RequestLogger\Providers\LoggerServiceProvider',
),

'logger' => [
    'enabled'   => true,
    'handlers'  => ['Prettus\RequestLogger\Handler\HttpLoggerHandler'],
    'file'      => storage_path("logs/http.log"),
    'level'     => 'info',
    'format'    => 'common'
],
'exclude' => [

	'exclude' => [

        'method' => [

            //Like GET,POST,
            'get'

        ],

        'route' => [

        ]

    ],

],
shell
php artisan vendor:publish --provider="Prettus\RequestLogger\Providers\LoggerServiceProvider"

[2015-04-03 00:00:00] local.INFO: GET http://prettus.local/user/1?param=lorem ["REQUEST"]

[2015-04-03 00:00:00] local.INFO: GET http://prettus.local/user/1?param=lorem 192.168.10.1 80 ["REQUEST"]