You will get many different opinions on this subject .....
Ultimately, it should contain any information that you think will be relevant to your application. It should also contain information that helps you determine what is happening with the application. This does not mean that it should contain errors, but it can if you want to use it in this way.
At a minimum, I would suggest that you include:
- application start / stop time
- app name
- skip / failure information (if applicable)
Optional elements:
- call processing (if not too intense)
- if you decide to combine application and error logs
- messaging (if not too intense)
One thing you want to keep in mind is that you don’t want to write so much information in your logs that you affect the performance of your application. In addition, you want your log files not to be so large that you run out of disk space.
source share