sourcefuse / loopback4-audit-log

A loopback-next extension for implementing audit logs in loopback applications for all DB transactions.
https://npmjs.com/package/@sourceloop/audit-log
MIT License
36 stars 12 forks source link

Bifurcation of Logs into different collections using a Configuration #111

Open siva-nadella-lab opened 6 months ago

siva-nadella-lab commented 6 months ago

Hi,

Thank you for a great library supporting audit feature. While the feature is comprehensive, is there a way I can configure where my logs should go and sit.

To quote a few examples, I may want to:

  1. Have my logs go into separate tables/collections based on the Source Application. Meaning thereby, let's say I have multiple applications but would like to have all my audit data in a single database, but seggregated into separate tables/collections. Is this a possibility?
  2. Have my logs move into a dynamically created table/collection by date. Meaning thereby, let's say, I configure my logging/auditing such that every month or so, a new table/collection gets created and the audit logs go into this table/collection.

Please let me know your thoughts on the above two.

Warm Regards Siva

yeshamavani commented 6 months ago

Hi,

Thank you for a great library supporting audit feature. While the feature is comprehensive, is there a way I can configure where my logs should go and sit.

To quote a few examples, I may want to:

  1. Have my logs go into separate tables/collections based on the Source Application. Meaning thereby, let's say I have multiple applications but would like to have all my audit data in a single database, but seggregated into separate tables/collections. Is this a possibility?
  2. Have my logs move into a dynamically created table/collection by date. Meaning thereby, let's say, I configure my logging/auditing such that every month or so, a new table/collection gets created and the audit logs go into this table/collection.

Please let me know your thoughts on the above two.

Warm Regards Siva

Let me look at this in detail and check how this is possible

siva-nadella-lab commented 6 months ago

Hello,

Any further updates on this?

Regards Siva

yeshamavani commented 6 months ago

This is actually not that straight forward as we mention the table name in our model class. Needs more analysis on this.

samarpan-b commented 6 months ago

@yeshamavani can't we suggest the archival approach? Community can use that to achieve similar scenarios.

siva-nadella-lab commented 5 months ago

Hi

Any further update on this?

Regards Siva

yeshamavani commented 5 months ago

Hello There is nothing direct available right now but if you wish to save your logs somewhere else or archive them based on time we have archival feature in our https://www.npmjs.com/package/@sourceloop/audit-service that helps you save logs on s3, but this is configurable and you can save it as per your business requirements