Laravel API logger to log responses and requests to file.

0.2.0-beta 2021-02-15 16:29 UTC

This package is auto-updated.

Last update: 2021-10-15 18:14:59 UTC


Laravel 5.7 Laravel 5.6 Laravel 5.5 Laravel 5.4

Laravel component to log API requests and responses to file.


Perhaps it works with lesser versions as well, but this is untested.

  • PHP 5.6 or above
  • Laravel 5.4 or above


Add package via composer:

composer require magentron/laravel-api-logger

For Laravel version < 5.5, edit config/app.php, add the following to the providers array:





  • Use Monolog or other log writers to support other destinations than file system
  • Restrict logging to specific HTTP methods and/or URI's
  • Specify HTTP status codes to log
  • Write tests and gain 100% code coverage


Jeroen Derks, a.k.a Magentron


This project was inspired by the following projects:


laravel-api-logger is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

laravel-api-logger is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with laravel-api-logger. If not, see