Skip to content

Releases: mtownsend5512/laravel-request-response-logger

Added custom logic to check if a request/response should be logged

08 Oct 23:14
Compare
Choose a tag to compare

You can now add your own custom logic to specify if a request/response should be logged. Comes with 3 new adapters out of the box:

  • LogAll - log request & response
  • LogClientErrorsOnly - log only responses that have an http status code of 4XX
  • LogSuccessOnly - log only responses that have an http status code of 2XX

Upgrade from 1.0.X -> 2.0.X

  1. Install v2.0.X with composer
  2. Add the following to the bottom of your config/log-requests-and-responses.php:
/**
 * The class responsible for determining if a request should be logged.
 * 
 * Out of the box options are:
 * Mtownsend\RequestResponseLogger\Support\Logging\LogAll::class,
 * Mtownsend\RequestResponseLogger\Support\Logging\LogClientErrorsOnly::class,
 * Mtownsend\RequestResponseLogger\Support\Logging\LogSuccessOnly::class,
 */
'should_log_handler' => \Mtownsend\RequestResponseLogger\Support\Logging\LogAll::class,

Removed HasFactory trait requirement on RequestResponseLog model

05 Oct 15:45
Compare
Choose a tag to compare

Removed HasFactory trait seeing as it does not exist in Laravel 7 apps

Initial release

03 Aug 18:11
Compare
Choose a tag to compare