jaleeldgk/laravel-access-logs

A Laravel package for logging user requests, best way to log all requests for debugging purpose.

Installs: 87

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/jaleeldgk/laravel-access-logs

v1.1.0 2024-06-19 08:09 UTC

This package is auto-updated.

Last update: 2025-12-19 13:08:51 UTC


README

A Laravel package for logging user activities and errors.

Installation

Install via composer:

composer require jaleeldgk/laravel-access-logs

Publishing files

Install via composer:

php artisan vendor:publish --provider="Jaleeldgk\LaravelAccessLogs\LaravelAccessLogsServiceProvider" --tag="config"
php artisan migrate

Usage

You can log user activity by calling the LogHelper::createLog() method from anywhere in your application:

use Jaleeldgk\LaravelAccessLogs\Helpers\LogHelper;
LogHelper::createLog()

Configuration

You can customize the logging behavior by editing the config/laravel-access-logs.php file:

return [
    'log_user_id' => true,
    'log_ip' => true,
    'log_user_agent' => true,
    'log_params' => true,
    'log_error_message' => true,
    'log_error_trace' => true,
    'log_referral' => true,
    'log_feedback' => true,
];

Author

Jaleel Ahmad Email: jaleel.ds20@gmail.com GitHub: github.com/jaleeldgk

License

This package is open-sourced software licensed under the MIT license.

Test the Package

Ensure that the package is working correctly by running the tests:

./vendor/bin/phpunit