Skip to content

Commit

Permalink
Reduce logging in m_devices_components when no file, share or server …
Browse files Browse the repository at this point in the history
…item supplied.
  • Loading branch information
mark-unwin committed Feb 11, 2019
1 parent 1623605 commit d5d4f85
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@
}

$parameters = new stdClass();
$parameters->input = $json->system;
$parameters->log = $log;
$parameters->input = $json->system;
$json->system = audit_format_system($parameters);
$details = $json->system;

Expand Down
19 changes: 11 additions & 8 deletions code_igniter/application/models/m_devices_components.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,17 @@ public function process_component($parameters)
} else {
$message .= ' Input supplied.';
}
$mylog = new stdClass();
$mylog->severity = 4;
$mylog->status = 'fail';
$mylog->summary = 'Function process_component called without correct params object';
$mylog->message = $message;
$mylog->file = 'm_devices_components';
$mylog->function = 'process_component';
stdlog($mylog);
# Don't bother to log the below as most of the time, they're empty
if ($table !== 'file' and $table !== 'share' and $table !== 'server_item') {
$mylog = new stdClass();
$mylog->severity = 6;
$mylog->status = 'notice';
$mylog->summary = 'Function process_component called without correct params object';
$mylog->message = $message;
$mylog->file = 'm_devices_components';
$mylog->function = 'process_component';
stdlog($mylog);
}
return;
}

Expand Down

0 comments on commit d5d4f85

Please sign in to comment.