hsnbd/auditlog

Elasticsearch auditlog for laravel application.

0.0.1 2021-02-04 12:51 UTC

This package is auto-updated.

Last update: 2024-05-11 16:14:17 UTC


README

An easy way to use the official Elastic Search client for auditlog in your Laravel applications.

Total Downloads Latest Stable Version Latest Stable Version License

Installation

Install the current version of the hsnbd/auditlog package via composer:

composer require hsnbd/auditlog

After install, Laravel will automatically register The package's service provider.

Publish the configuration file:

php artisan vendor:publish --provider="Hsnbd\AuditLogger\AuditLoggerServiceProvider"

Usage

hsnbd/auditlog use laravel default queue.

php artisan queue:table

php artisan migrate

The AuditLog facade is used for logging. In order to use that.

\Hsnbd\AuditLogger\AuditLog::info('Hello World');
\Hsnbd\AuditLogger\AuditLog::debug('Hello World');

This command must run always. php artisan queue:work database --queue=listeners

Please see Available Commands section before start.

Available Commands

Some useful console commands.

For Bootstrap basic setup for ELK stack

php artisan auditlog:bootstrap

Test auditlog if it is working or not.

php artisan auditlog:test

Laravel Model Log

If you want to track every step of laravel model, you can set it using.

class ABCModel extends Model implements \Hsnbd\AuditLogger\Interfaces\ShouldAuditLog {}

So you don't have to do anything after that.

Contributions and Support

Thanks to everyone who has contributed to this project!

Please see CONTRIBUTING.md to contribute.

If you found any bugs, Please report it using Github

Author

Baker Hasan 📧 Email Me

Buy Me A Coffee

License

This project is licensed under the MIT License - see the License File.