chore: update wording of inline comments
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user