It's like this: Two months ago to do a small function, today the manager suddenly asked me this ' clear duplicate record ' function is not I do, I said yes, a long time ago. He said yesterday a customer came over, backstage to the people's record of the recovery to clear out, do not know when to clear, I remember when I was doing with the product is to discuss the direct deletion of this record is not to modify the status of the record, who would have thought that a customer will come to find it? The log is not printed until the exception is logged, and the log is not printed when the correct cleanup occurs
In order to have a good development habits, should be in the important place to join the log printing, not every line of code to add the log, in fact, regardless of whether the results are correct or abnormal need to print the log, including the user's information and the time to perform the operation, as far as possible in the log to reflect, In case there is a problem in time to solve.
Just for the personal summary, and then come up with a record again, can let their own code written to more rigorous point.
Personal understanding of when to include logging in development---[Java]