title: how to properly format stack trace information in asp.net core
body: <p>I have asp.net core's layered architecture something like code below.  </p>
  
  <p><a href="https://i.stack.imgur.com/ts0Sp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ts0Sp.png" alt="enter image description here"></a></p>
  
  <p>and the main function (API controller) is calling the GrandParent method and controller function also has the try-catch block. for example, an exception occurs in GetNumber function. the exception will bubble-up to the controller. Now if i see the stack trace i can see the trace from Controller->Grandparent->Parent->GetNumber. </p>
  
  <p>is there a way to beautify this stack trace in a way that can tell me this entire stack of calls with just their function names and line number where the original exception occurred, so that I can simply log that formatted beautified information instead of logging the original stack trace?</p>
  
  <p>Is there something Asp.net core gives out of the box for such a problem? </p>