Inappropriate Log Level (ARCH7161)
Key php.logging.inappropriate-log-level · Severity info · Category logging
Logging errors at info/debug level (or routine flow at error) causes warnings to be lost and produces alert noise.
Incorrect
Section titled “Incorrect”<?phptry { $this->process($job);} catch (\Throwable $e) { $this->logger->info('Job failed', ['exception' => $e]);}Correct
Section titled “Correct”<?phptry { $this->process($job);} catch (\Throwable $e) { $this->logger->error('Job failed', ['exception' => $e]);}Match the log level to the event’s severity: error for failures, info for normal flow.