refactor(logging): remove redundant log record creation in DefaultLogger handlers loop

This commit is contained in:
2025-11-04 11:10:51 +01:00
parent 02e4dc9338
commit 980714f656

View File

@@ -138,20 +138,6 @@ final readonly class DefaultLogger implements Logger, SupportsChannels
// Alle Handler durchlaufen
foreach ($this->handlers as $handler) {
if ($handler->isHandling($processedRecord)) {
$array = explode('\\',$handler::class);
$handlerName = end($array);
// Log-Record erstellen
$record = new LogRecord(
message: $handlerName . ' --- ' . $message,
context: $finalContext,
level: $level,
timestamp: $this->clock->now(),
channel: $channel
);
$processedRecord = $this->processorManager->processRecord($record);
$handler->handle($processedRecord);
}
}