PHP code example of magentron / laravel-request-logger

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

    

magentron / laravel-request-logger example snippets


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

 'logger' => [
    'enabled'   => true,
    'handlers'  => ['Prettus\RequestLogger\Handler\HttpLoggerHandler'],
    'file'      => storage_path("logs/http.log"),
    'level'     => 'info',
    'format'    => 'common'
]
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"]