crudlog/laravel-logger

The official CrudLog client package for implicitly logging activities in Laravel applications.

v1.0.8 2025-08-20 19:57 UTC

This package is auto-updated.

Last update: 2025-08-20 20:04:56 UTC


README

Latest Version on Packagist Total Downloads

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.

  1. Sign up for a free account at CrudLog.com.
  2. Navigate to your Account -> API Keys dashboard and generate a new key.
  3. 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.

  1. Log in to your CrudLog account.
  2. Navigate to the Logging Configuration page.
  3. 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.