What is the correct Log Message expression that the developer should use to integrate comprehensive log messages into the process under development, indicating which activity caused the error?
A.
"Exception occurred at " + exception.StackTrace
C. Doesn't compile in that form unless we write it like this: 'exception.Message'. I don't know if that typo was intentional.
The correct form displays for example 'Index was out of bounds of the array' and the source, which is typically the name of the application or the object that caused the error. It does not indicate the activity that caused the error.
B and D only display source of the exception.
A provides the most detailed information about the error for me.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
TomaszWol
6 months, 1 week agoa48535d
6 months, 1 week ago