magentron / laravel-api-logger
Laravel API logger to log responses and requests to file.
Installs: 1 897
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 4
Open Issues: 0
Requires
- ext-json: *
- laravel/framework: ^5.4|^6.20.14|^7|^8
Requires (Dev)
- php: ^5.6|^7|^8
- clean/phpdoc-md: 9999999-dev
- friendsofphp/php-cs-fixer: 9999999-dev
- orchestra/testbench: ^3.4.x-dev
- phploc/phploc: ^4.0
- phpmd/phpmd: 9999999-dev
- phpunit/phpunit: ^5.7
- sebastian/phpcpd: ^3.0
- squizlabs/php_codesniffer: ^3.x-dev
- theseer/phpdox: ^0.11.2
This package is auto-updated.
Last update: 2024-11-17 21:14:23 UTC
README
Laravel component to log API requests and responses to file.
Requirements
Perhaps it works with lesser versions as well, but this is untested.
- PHP 5.6 or above
- Laravel 5.4 or above
Installation
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:
Magentron\ApiLogger\Providers\ServiceProvider::class,
Usage
TODO
TODO
- 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
Author
Jeroen Derks, a.k.a Magentron
Inspiration
This project was inspired by the following projects:
License
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 http://www.gnu.org/licenses/.