title: Using the StackTrace Class in a production environment to get calling method info
body: <p>We have a "log" class which uses Relection.MethodBase to send current class info to the log.</p>
  
  <p>The reflection.MethodBase stuff happens in the class itself.</p>
  
  <p>However, I'd like to move that stuff to a single external "log" singleton type class.</p>
  
  <p>In this scenario the external log class needs to get the CALLING info, not the current method info. I'm using stacktrace to do this, which isn't in the Reflection namespace.</p>
  
  <p>Can I guarantee that "that" specific information (calling method) will be there in a production environment?</p>
  
  <pre><code> var stackTrace = new StackTrace();
   return LogManager.GetLogger(stackTrace.GetFrame(1).GetMethod().DeclaringType);
  </code></pre>
  
  <p>cheers!</p>