Docs / Getting Started / Introduction

Introduction

Know who did what, and when, in your Symfony application.

What is SymfonyAuditLog?

The bundle records an audit trail of the actions in your application. It records Doctrine changes, controller access, console commands, logins, Messenger messages and workflow transitions. It stores the trail where you want: a SQL table, Elasticsearch, MongoDB, a file or stdout.

How it works

A source or your code sends an entry to AuditLogger. AuditLogger writes it to the outputs. Viewers read the readable outputs. A source or your code sends an entry to AuditLogger. AuditLogger writes it to the outputs. Viewers read the readable outputs.

An entry has a source, an action, a message, a date and a context: key-value data such as the user or the changed fields.

Nothing is recorded by default

Enable at least one source and one output. Then add #[Auditable] to the classes to record:

src/Entity/Book.php
use SymfonyCorp\AuditLog\Attribute\Auditable;

#[ORM\Entity]
#[Auditable]
class Book
{
    // each INSERT, UPDATE and DELETE is recorded
}

GDPR, ISO 27001 and SOC 2

The bundle gives evidence for your GDPR, ISO 27001 and SOC 2 audits: who did what and when, who read the entries, and which entry changed. See the status of each rule in GDPR, ISO 27001, SOC 2.

Good to know - the bundle does not make your application compliant or certified.

Backward compatibility

The bundle follows the Symfony backward compatibility promise.

Next steps

Go to Installation to install the bundle and record your first entry. Then see Configuration for all the options.