cavin-kim / laravel-terminal-logger
A Laravel package to log all http requests, queries, and views in the terminal.
v1.1.7
2025-03-29 11:40 UTC
Requires
- php: ^8.0
- illuminate/http: ^9.0 || ^10.0 || ^12.0
- illuminate/support: ^9.0 || ^10.0 || ^12.0
Requires (Dev)
- orchestra/testbench: ^7.0
- phpunit/phpunit: ^9.0
README
laravel-terminal-logger
:
Laravel Terminal Logger
A lightweight Laravel package to log HTTP requests, responses, database queries, and rendered views directly to the terminal or log files.
Features
- Logs detailed HTTP requests (method, URL, headers, body).
- Logs HTTP responses (status code, content).
- Logs all database queries with execution time.
- Logs rendered views with associated data.
- Easy installation and configuration.
Installation
-
Install the package via Composer:
composer require cavin-kim/laravel-terminal-logger
-
Publish the configuration file:
php artisan vendor:publish --tag=config
-
Start your Laravel server:
php artisan serve
Configuration
You can customize logging behavior by editing config/terminal-logger.php
:
return [ 'log_requests' => true, 'log_responses' => true, 'log_queries' => true, 'log_views' => true, ];
Usage
Once installed, the package will automatically log everything based on your configuration. No additional setup is required.
Support
If you encounter any issues or have suggestions, feel free to open an issue on the GitHub repository.