updateddata/laravel-request-logger

Logs Laravel HTTP Requests

v0.1.7 2024-03-12 10:31 UTC

This package is auto-updated.

Last update: 2024-05-12 12:00:21 UTC


README

This package logs all http-Request. It also optionally saves attached files and also optionally compresses them.

Installation:

  • Require the package
composer require updateddata/laravel-request-logger
  • Publish the assets
php artisan vendor:publish --provider="UpdatedData\LaravelRequestLogger\RequestLoggerServiceProvider"

Config:

All variables can either be set as ENV vars or in config/request-logger.php

Name Default Effect
REQUEST_LOGGER_ENABLED true Enables or disables logging
REQUEST_LOGGER_DRIVER database Defines how the logging should be done
REQUEST_LOGGER_RETENTION 14 Defines how long the logs should be kept. Set to 0 for indefinetly
REQUEST_LOGGER_STORE_ATTACHMENTS false Enables persistence for uploaded files
REQUEST_LOGGER_COMPRESSION_ENABLED false Enables compression for uploaded files.
REQUEST_LOGGER_COMPRESSION_COMPRESSOR gz Compressionalgorith. For now only gz is supported

Security notice

Logging files should only be enabled for specific endpoints. Yet that feature is not implemented