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

MongoDb, User, IAuditable and Tests implementation added. #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

victorioustr
Copy link

This PR introduces a series of improvements and features to enhance the audit logging functionality for entities implementing the IAuditable interface. The main changes include:

  1. MongoDB Integration for Audit Logs
  • Implemented MongoDB as the backend for storing audit logs, ensuring scalability and reliability.
  1. Selective Entity Auditing
  • Configured the audit logging system to work exclusively with entities implementing the IAuditable interface. This ensures that only the relevant entities are logged, reducing unnecessary overhead.
  1. Change Tracking Enhancements
  • Introduced a parameter to ignore logging for fields that have not changed during an update operation. This reduces noise in the audit logs and focuses on meaningful changes.
  1. User Information Logging
  • Integrated IHttpContextAccessor to capture and log the user information performing the changes. This includes details like the user's identity, enhancing traceability and accountability.
  1. Database Migrations for Audit Log Storage
  • Added the necessary database migrations to support for storing audit logs.

Key Benefits:

  • Improved clarity and focus in audit logs by excluding unchanged fields.

  • Enhanced traceability with user information logged for each operation.

  • Optimized auditing system by restricting it to IAuditable entities.

  • Scalability with MongoDB as the audit log backend.

Testing & Validation:

  • Verified the new audit logging functionality with various IAuditable entities.

  • Tested the change tracking parameter to ensure unchanged fields are ignored as expected.

  • Confirmed successful integration of user information from IHttpContextAccessor.

  • Validated the database migrations for compatibility and correctness.

Please review the changes and let me know if additional refinements or documentation are needed.

@furkandeveloper furkandeveloper self-requested a review December 22, 2024 11:17
@furkandeveloper furkandeveloper self-assigned this Dec 22, 2024
@furkandeveloper furkandeveloper added the enhancement New feature or request label Dec 22, 2024
@furkandeveloper
Copy link
Owner

Looks great. There are quite a few changes. It may take me a while to check them all. Thanks for your input. I'll take care of it as soon as possible. 🚀 @victorioustr

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

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy