title: Is there a better way than #if DebugMode for logging
body: <p>I'm making a c++ library thats going to be P/Invoked from c#, so i am unable to breakpoint/debug the c++ side of things. So i decided to add logging so i can see if anything goes wrong and where it happens. I add a <code>#define DebugMode 1</code> in order to determine if i am to log or not.
  First of all i'm not very good at c++ but i know enough to get around. So my questions are:</p>
  
  <ol>
  <li><p>Is there a better way than wrapping <code>#if DebugMode #endif</code>s around every Log call? I could simply do that inside the Log method and just return if logging isn't enabled but won't that mean then all those logging strings will be in the assembly?</p></li>
  <li><p>How can i emulate what printf does with its "..." operator enabling me to pass something like  <code>Log("Variable x is {0}", x);</code> </p></li>
  <li><p>Is there any tricks such as getting the line number or stack trace information of some sort that i can use in the log?</p></li>
  </ol>
  
  <p>Thanks!</p>