Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Log Entry Bundle Laravel Package

beutsing/log-entry-bundle

View on GitHub
Deep Wiki
Context7

Beutsing LogEntry Bundle

Description

The Beutsing LogEntry Bundle allows you to easily record user actions in your Symfony application.
Every significant action (creation, modification, deletion, etc.) can be automatically or manually logged in a log_entries table.

This bundle uses Doctrine ORM to persist logs and can be integrated into any Symfony 6, 7, or 8 project.


Installation

  1. Install the bundle via Composer:
composer require beutsing/log-entry-bundle

  1. Create the migration for the log_entry table:
php bin/console make:migration
php bin/console doctrine:migrations:migrate

Symfony will generate a migration file like Version20260309XXXXXX.php (depending on the date and time), which will create the log_entry table in your database.

  1. LogEntry Table Fields

The log_entry table includes the following fields:

Field Description
id Unique identifier of the log
userIdentifier Identifier of the user (email, username, etc.)
companyid (string) Optional company identifier
action (string) Action performed by the user
message (text) Descriptive message related to the action
createdAt (datetime) Date and time of log creation
  1. The bundle provides a service to easily create log entries. Example usage:
<?php
use Beutsing\LogEntryBundle\Service\LogEntryService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

class SomeController extends AbstractController
{
    public function someAction(LogEntryService $logService)
    {
        $logService->log(
            'CREATE_USER',                  
            'A new user has been created',  
            'COMPANY123'                     
        );

        return $this->json(['status' => 'ok']);
    }
}

Notes

The log service can be injected in any controller or service using Symfony's autowiring.

The createdAt field is automatically set when a log entry is created. The userIdentifier field is automatically filled with the identifier of the currently authenticated user (email, username, etc.). If you run composer update beutsing/log-entry-bundle to update the bundle, you must also execute the migration commands to update your database:

php bin/console make:migration
php bin/console doctrine:migrations:migrate

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours