Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error thrown when $exclude == null in ResponseLoggerMiddleware.php #4

Open
orharel opened this issue Jan 30, 2016 · 1 comment
Open

Comments

@orharel
Copy link

orharel commented Jan 30, 2016

The following error get generated:

ErrorException in ResponseLoggerMiddleware.php line 44:
Invalid argument supplied for foreach()
in ResponseLoggerMiddleware.php line 44
at HandleExceptions->handleError('2', 'Invalid argument supplied for foreach()', '/var/www/cyadev/vendor/prettus/laravel-request-logger/src/Prettus/RequestLogger/Middlewares/ResponseLoggerMiddleware.php', '44', array('request' => object(Request), 'exclude' => null)) in ResponseLoggerMiddleware.php line 44
at ResponseLoggerMiddleware->excluded(object(Request)) in ResponseLoggerMiddleware.php line 30
at ResponseLoggerMiddleware->terminate(object(Request), object(Response)) in Kernel.php line 145
at Kernel->terminate(object(Request), object(Response)) in index.php line 58

@aliharis
Copy link

aliharis commented May 3, 2016

Update the config file to include the exclude parameter.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants