Add additional eventlog severity levels (#5879)

This commit is contained in:
Richard Mayhew
2017-02-14 00:32:02 +02:00
committed by Neil Lathwood
parent a44d4254f8
commit e4f48e661e
17 changed files with 57 additions and 57 deletions

View File

@@ -19,13 +19,13 @@ foreach ($toner_data as $toner) {
// Log empty supplies (but only once)
if ($tonerperc == 0 && $toner['toner_current'] > 0) {
log_event('Toner ' . $toner['toner_descr'] . ' is empty', $device, 'toner', $toner['toner_id']);
log_event('Toner ' . $toner['toner_descr'] . ' is empty', $device, 'toner', 5, $toner['toner_id']);
}
// Log toner swap
if ($tonerperc > $toner['toner_current']) {
log_event('Toner ' . $toner['toner_descr'] . ' was replaced (new level: ' . $tonerperc . '%)', $device, 'toner', $toner['toner_id']);
log_event('Toner ' . $toner['toner_descr'] . ' was replaced (new level: ' . $tonerperc . '%)', $device, 'toner', 3, $toner['toner_id']);
}
dbUpdate(array('toner_current' => $tonerperc, 'toner_capacity' => $toner['toner_capacity']), 'toner', '`toner_id` = ?', array($toner['toner_id']));
dbUpdate(array('toner_current' => $tonerperc, 'toner_capacity' => $toner['toner_capacity']), 'toner', '`toner_id` = ?', 4, array($toner['toner_id']));
}//end foreach