chore: update wording of inline comments

This commit is contained in:
Björn Fromme
2026-08-24 09:19:32 +02:00
parent 48db290625
commit 1796ec4964
2 changed files with 9 additions and 16 deletions
+6 -11
View File
@@ -11,18 +11,13 @@ use Monolog\Level;
use Monolog\LogRecord;
/**
* Monolog handler that persists log entries to the database.
* Persists log entries to the database.
*
* Writes log records to the log_entry table, replacing message placeholders
* with context values. Includes channel, context, and extra data for auditing.
* Only processes INFO level and above to avoid storing debug messages.
*
* The write goes through the DBAL connection rather than the EntityManager on purpose. A log record
* can be emitted at any point, including halfway through somebody else's unit of work, and an
* EntityManager flush would write out whatever that unit of work has pending so far — which is how
* a half-built User once reached the database with a NULL password. Staying out of the UnitOfWork
* also keeps logging alive after a failed flush has closed the EntityManager, which is exactly when
* there is something worth logging.
* The write goes through DBAL rather than the EntityManager on purpose. A log record can be emitted
* halfway through somebody else's unit of work, and an EntityManager flush would write out whatever
* that unit of work has pending — which is how a half-built User once reached the database with a
* NULL password. Staying out of the UnitOfWork also keeps logging alive after a failed flush has
* closed the EntityManager, which is exactly when there is something worth logging.
*
* Reads still go through the LogEntry entity and its repository.
*/