Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've seen that some of software systems have functionality of audit and log. Both of those functionality seem that they are just doing the same things - records all the users's actions behind the scene. There are respective tables of audit and log even exist in the database. If they are really doing the same things why the developer developed duplicated function in a system?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

From what I have worked on, there is a difference between them based on their nature. A log is(may be) perishable while an audit trail is secure and non-perishable. As a result ou will never log sensitive information or information which you will need later. An audit trail on the other hand is secure. It is something that should not be perished easily.

For example : in a bank software you will audit the transactions;: credit-debit, failed transactions etc. This audit will be in to the database. THe log file may save the transaction that crashed when the softare failed and did not enter the system.

share|improve this answer

i use audit to trace the users actions, and to reconstruct current values.

for instance, we have a table with giftcardvalues, and we can see in that table that the current value is $100 and the original value $200.

Is that correct, we don't know....

for that question to be answered we have to know what happened in between.

so we have a audit table in which we save all actions for that table, like this:

jan. 1 init $200

jan. 3 add $300

jan. 5 subtract $350

jan. 7 check value (returned 150)

jan. 8 subtract $50

now i know what to say if a user calls and says: hey, where did my $100 go?

'normal' logging is used to log errors, process info etc. wo we can debug the app when, for instance, the audit info and the actual values for the giftcard don't match, so we can see what is going wrong in the code.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.