mysql - Whats a better strategy for storing log data in a database? -


I want to create an application that requires extensive logging of users, payments, etc.

Am I am better with a monolithic log table, and just log everything in it ... or for each type of action, log log (log_piment, log-login, log_x_change) Better to keep separate log tables?

For example, currently logging user interaction with a payment gateway. When they sign up for a test, when the test becomes a subscription, when this bill is received, the refund is done, if failure occurs or not, etc.

I would like to start logging tasks or events

Edit: with no payment gateway (renewal cancellation, restriction, do not interact with payment failures) The data will also be checked for entry, entry, data to verify its integrity on a regular basis, because people will have to pay on its basis, therefore accurate data is very important. Read the questions by me and 2 Will be done by the new administrators, 99% of the time, it is going to be written / updated.

I have only estimated to be more than one table, only produces more points of failure during criticism Mysql transactions that deal with payment data include and update, etc.

This logging Depending on the purpose of. For the purpose of debugging and general monitoring, A single log table with dynamic log level will be helpful so that you can periodically see the system how the system is running. On the other hand, for the audit trail purpose, nothing is possible with all the tables with every CRUDD operation As with duplicate table, every such information has been received in the payout table or whatever will be captured in your audit table.

So, the answer is both.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -