Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Convert logging to a function #1039

Closed
wrongecho opened this issue Sep 10, 2024 · 2 comments
Closed

Feature Request: Convert logging to a function #1039

wrongecho opened this issue Sep 10, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@wrongecho
Copy link
Collaborator

If we convert logging to a function, we can save on a lot of repetition, e.g.

  • mysqli_query($mysqli,"INSERT INTO logs SET log_type
  • log_ip = '$session_ip', log_user_agent = '$session_user_agent',
  • log_user_id = $session_user_id,

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);

@wrongecho wrongecho added the enhancement New feature or request label Sep 10, 2024
@johnnyq
Copy link
Collaborator

johnnyq commented Sep 10, 2024

Hey @wrongecho this would be fantastic totally up for this

@johnnyq
Copy link
Collaborator

johnnyq commented Nov 9, 2024

logging has been functionalized, working slowly to implement everywhere 7b4dda0

closing out

@johnnyq johnnyq closed this as completed Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants