Duplicate Log Message (ARCH7162)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Key php.logging.duplicate-log-message · Severity info · Category logging
Repeating an identical log message literal within the same class or file makes log lines ambiguous about their source and complicates debugging.
Incorrect
Section titled “Incorrect”<?phppublic function sync(): void{ $this->logger->error('Sync failed'); // ... $this->logger->error('Sync failed');}Correct
Section titled “Correct”<?phppublic function sync(): void{ $this->logger->error('Sync failed during fetch'); // ... $this->logger->error('Sync failed during persist');}Make each log line unique so it distinguishes its call context.