Skip to content

Commit

Permalink
Fix log severity (more)
Browse files Browse the repository at this point in the history
  • Loading branch information
murrant committed Oct 4, 2023
1 parent 16e8dbb commit 2c85a42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions LibreNMS/Modules/Os.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use App\Models\Device;
use App\Models\Eventlog;
use App\Models\Location;
use LibreNMS\Enum\Severity;
use LibreNMS\Interfaces\Module;
use LibreNMS\Interfaces\Polling\OSPolling;
use LibreNMS\Util\Url;
Expand Down Expand Up @@ -71,11 +72,11 @@ public function poll(\LibreNMS\OS $os): void

if (is_file(base_path('/includes/polling/os/' . $device['os'] . '.inc.php'))) {
// OS Specific
Eventlog::log("Warning: OS {$device['os']} using deprecated polling method", $deviceModel, 'poller', 5);
Eventlog::log("Warning: OS {$device['os']} using deprecated polling method", $deviceModel, 'poller', Severity::Error);
include base_path('/includes/polling/os/' . $device['os'] . '.inc.php');
} elseif (! empty($device['os_group']) && is_file(base_path('/includes/polling/os/' . $device['os_group'] . '.inc.php'))) {
// OS Group Specific
Eventlog::log("Warning: OS {$device['os']} using deprecated polling method", $deviceModel, 'poller', 5);
Eventlog::log("Warning: OS {$device['os']} using deprecated polling method", $deviceModel, 'poller', Severity::Error);
include base_path('/includes/polling/os/' . $device['os_group'] . '.inc.php');
}

Expand Down

0 comments on commit 2c85a42

Please sign in to comment.