You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue:
We are currently using the Audited gem to handle audit logs in our Rails application. However, we have a specific use case where we do not want the audit logs generated by Audited to be stored in our PostgreSQL database. Instead, we are using an external source for our audit log storage.
# models/audit.rb
class Audit < Audited::Audit
before_create :upload_logs
after_initialize :set_user_details
def upload_logs
audit_adapter.upload_logs_to_external_source
end
def set_user_details
audit_adapter.set_user_details
end
private
def audit_adapter
@audit_adapter ||= AuditAdapter.new(self)
end
end
In the above code, we have a custom Audit model that inherits from Audited::Audit. We've implemented upload_logs and set_user_details methods to handle the upload of audit logs to an external source and setting user details, respectively.
Expected Outcome:
The goal is to configure Audited in a way that prevents it from storing any data in the PostgreSQL database, ensuring that all audit logs are exclusively stored in our external source.
Additional Context:
audited '5.0.2'
rails '5.2.8.1'
ruby '2.5.1'
Note:
We are seeking guidance on how to configure Audited or if there is a recommended approach to achieve this outcome. Any assistance or suggestions would be greatly appreciated
The text was updated successfully, but these errors were encountered:
Issue:
We are currently using the Audited gem to handle audit logs in our Rails application. However, we have a specific use case where we do not want the audit logs generated by Audited to be stored in our PostgreSQL database. Instead, we are using an external source for our audit log storage.
In the above code, we have a custom Audit model that inherits from Audited::Audit. We've implemented upload_logs and set_user_details methods to handle the upload of audit logs to an external source and setting user details, respectively.
Expected Outcome:
The goal is to configure Audited in a way that prevents it from storing any data in the PostgreSQL database, ensuring that all audit logs are exclusively stored in our external source.
Additional Context:
Note:
We are seeking guidance on how to configure Audited or if there is a recommended approach to achieve this outcome. Any assistance or suggestions would be greatly appreciated
The text was updated successfully, but these errors were encountered: