Ir al contenido

Inappropriate Log Level (ARCH7161)

Esta página aún no está disponible en tu idioma.

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.

<?php
try {
$this->process($job);
} catch (\Throwable $e) {
$this->logger->info('Job failed', ['exception' => $e]);
}
<?php
try {
$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.