The datetime persited in the database log records reflect the persitence date instead of the effective log creation
It seams that the createdAt should come from $record :
|
public function __construct( |
|
\Monolog\LogRecord $record, |
|
#[ORM\ManyToOne(targetEntity: ProcessExecution::class, cascade: ['all'])] |
|
#[ORM\JoinColumn(name: 'process_execution_id', referencedColumnName: 'id', onDelete: 'CASCADE', nullable: false)] |
|
private readonly ProcessExecution $processExecution, |
|
) { |
|
$this->channel = (string) (new UnicodeString($record->channel))->truncate(64); |
|
$this->level = $record->level->value; |
|
$this->message = (string) (new UnicodeString($record->message))->truncate(512); |
|
$this->context = $record->context; |
|
$this->createdAt = \DateTimeImmutable::createFromMutable(new \DateTime()); |
|
} |
The datetime persited in the database log records reflect the persitence date instead of the effective log creation
It seams that the createdAt should come from $record :
ui-process-bundle/src/Entity/LogRecord.php
Lines 51 to 62 in b15a94f