hsnbd / auditlog
Elasticsearch auditlog for laravel application.
Requires
- php: >=7.4
- elasticsearch/elasticsearch: ^7.10
- laravel/framework: >=5.7 <=8.16
- monolog/monolog: 2.x-dev
This package is auto-updated.
Last update: 2025-04-11 18:11:43 UTC
README
An easy way to use the official Elastic Search client for auditlog in your Laravel applications.
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
License
This project is licensed under the MIT License - see the License File.