Personal understanding of when to include logging in development---[Java]

Source: Internet
Author: User

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]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.