andersao / laravel-request-logger

HTTP request logger middleware for Laravel
http://andersao.github.io/laravel-request-logger
242 stars 57 forks source link

Missing request-logger.exclude #7

Open oceanapplications opened 8 years ago

oceanapplications commented 8 years ago

I'm getting this error message seemingly because config('request-logger.exclude') is returning null.

[2016-02-25 00:26:48] local.ERROR: exception 'ErrorException' with message 'Invalid argument supplied for foreach()' in /var/www/html/vendor/prettus/laravel-request-logger/src/Prettus/RequestLogger/Middlewares/ResponseLoggerMiddleware.php:44

AnassBounhar commented 8 years ago

im having the same issue here plz reply

AnassBounhar commented 8 years ago

@oceanapplications i added , 'exclude' => [] to the prettus config file to stop the error

crisp-github commented 8 years ago

Also needed to make the same change as @AnassBounhar to avoid exceptions like @oceanapplications mentions.

ozanmuyes commented 8 years ago

To clarify the work-around as @AnassBounhar stated; 'exclude' => [] pair MUST be the child of returned array, so logger key is in the same level as exclude key.