WatchdogEnabled.php in Site Audit 8.3
File
src/Plugin/SiteAuditCheck/WatchdogEnabled.php
View source
<?php
namespace Drupal\site_audit\Plugin\SiteAuditCheck;
use Drupal\site_audit\Plugin\SiteAuditCheckBase;
class WatchdogEnabled extends SiteAuditCheckBase {
public function getResultFail() {
}
public function getResultInfo() {
return $this
->t('Database logging (dblog) is not enabled; if the site is having problems, consider enabling it for debugging.');
}
public function getResultPass() {
return $this
->t('Database logging (dblog) is enabled.');
}
public function getResultWarn() {
}
public function getAction() {
}
public function calculateScore() {
if (!\Drupal::moduleHandler()
->moduleExists('dblog')) {
$this->registry->watchdog_enabled = FALSE;
$this->abort = TRUE;
return SiteAuditCheckBase::AUDIT_CHECK_SCORE_INFO;
}
$this->registry->watchdog_enabled = TRUE;
return SiteAuditCheckBase::AUDIT_CHECK_SCORE_PASS;
}
}