Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What should an Application Log ideally contain?

Tags:

c#

What kind of information should an Application Log ideally contain? How is it different from Error Log?

like image 214
softwarematter Avatar asked Jan 23 '23 13:01

softwarematter


1 Answers

You are going to get a lot of different opinions for this question.....

Ultimately it should contain any information that you think is going to be relevant to your application. It should also contain information that will help you determine what is happening with the application. That is not to say it should contain errors, but could if you wanted to use it that way.

At a minimum I would suggest that you include:

  • application start/stop time
  • application name
  • pass/fail information (if applicable)

Optional items would be:

  • call processing (if not too intensive)
  • errors if you decide to combine application and error logs
  • messaging (if not too intensive)

One thing you want to keep in mind is that you do not want to be writing so much information to your logs that you impact your application performance. Also, want to make sure you don't grow your log files so large that you run out of disk space.

like image 85
Mark Avatar answered Jan 26 '23 02:01

Mark