Closed wrongecho closed 1 week ago
Hey @wrongecho this would be fantastic totally up for this
logging has been functionalized, working slowly to implement everywhere https://github.com/itflow-org/itflow/commit/7b4dda0ad612de9cbcc89fe6625195df9f243c38
closing out
If we convert logging to a function, we can save on a lot of repetition, e.g.
Something like logAction( type , action , description , client_id (nullable) , entity_id (nullable) )
Would convert the below:
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Interface', log_action = 'Delete', log_description = '$session_name deleted interface $interface_name from asset $asset_name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, log_entity_id = $asset_id");
into:
logAction('Interface', 'Delete', '$session_name deleted interface $interface_name from asset $asset_name', $client_id, $asset_id
);