loopback4-audit-log icon indicating copy to clipboard operation
loopback4-audit-log copied to clipboard

Bifurcation of Logs into different collections using a Configuration

Open siva-nadella-lab opened this issue 1 year ago • 6 comments

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

siva-nadella-lab avatar Apr 17 '24 09:04 siva-nadella-lab

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

yeshamavani avatar Apr 17 '24 15:04 yeshamavani

Hello,

Any further updates on this?

Regards Siva

siva-nadella-lab avatar Apr 23 '24 06:04 siva-nadella-lab

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

yeshamavani avatar Apr 24 '24 13:04 yeshamavani

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

samarpan-b avatar Apr 28 '24 17:04 samarpan-b

Hi

Any further update on this?

Regards Siva

siva-nadella-lab avatar May 09 '24 19:05 siva-nadella-lab

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

yeshamavani avatar May 13 '24 05:05 yeshamavani