chore: Handler-Name zum Log-Output in DefaultLogger hinzufügen
This commit is contained in:
@@ -138,6 +138,20 @@ final readonly class DefaultLogger implements Logger, SupportsChannels
|
|||||||
// Alle Handler durchlaufen
|
// Alle Handler durchlaufen
|
||||||
foreach ($this->handlers as $handler) {
|
foreach ($this->handlers as $handler) {
|
||||||
if ($handler->isHandling($processedRecord)) {
|
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);
|
$handler->handle($processedRecord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user