crudlog / laravel-logger
The official CrudLog client package for implicitly logging activities in Laravel applications.
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.2
Requires (Dev)
- illuminate/contracts: ^11.0
- illuminate/database: ^11.0
- illuminate/events: ^11.0
- illuminate/http: ^11.0
- illuminate/support: ^11.0
- orchestra/testbench: ^9.0
- phpunit/phpunit: ^10.5
README
This is the official client package for the CrudLog service. An account at CrudLog.com is required to use this package.
CrudLog provides a complete, managed service for activity logging and audit trails. This Laravel package is the easiest way to implement "implicit logging" by automatically capturing Eloquent model events without changing your existing code.
What is CrudLog?
CrudLog is a SaaS platform that gives developers a powerful, framework-agnostic solution for logging user activities. Stop building audit trails from scratch. Our service provides:
- A secure, scalable backend to store your log data.
- A beautiful web dashboard to view, search, and filter logs.
- A flexible REST API to send and retrieve log data from any application.
- Configurable data masking, retention policies, and plan-based usage limits.
Create Your Free Account at CrudLog.com
Installation
You can install the package into your Laravel 11+ project via Composer:
composer require crudlog/laravel-logger
The package will automatically register its service provider.
Next, you must publish the configuration file:
php artisan vendor:publish --provider="CrudLog\Logger\Providers\LoggableServiceProvider" --tag="crudlog-config"
This will create a config/logging-service.php
file in your application.
Configuration
Finally, add your CrudLog API Key to your application's .env
file.
- Sign up for a free account at CrudLog.com.
- Navigate to your Account -> API Keys dashboard and generate a new key.
- Add the key to your
.env
file:
CRUDLOG_API_KEY="your-api-key-here" # Optional: You can also specify the dispatch method ('async' or 'sync'). # 'async' is recommended for best performance but requires a queue worker. CRUDLOG_DISPATCH_METHOD=async
Usage
Once the package is installed and configured, all logging rules are managed from your CrudLog dashboard.
- Log in to your CrudLog account.
- Navigate to the Logging Configuration page.
- Enable Implicit Logging and add the fully qualified class names of the Eloquent models you wish to track (e.g.,
App\Models\User
).
For more detailed instructions and advanced usage, please see our full Documentation on CrudLog.com.
Security
If you discover any security related issues, please email support@crudlog.com instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.