title: Proper way to print different debug messages in C?
body: <p>I need to print msg1 and msg2 for the same error when compiled with and without DEBUG flag. E.g.</p>
  
  <pre><code>      fprintf( stderr,
  #ifdef DEBUG
                        "error msg1 %s",__FILE__
  #else
                        "error msg2"
  #endif
                );
  </code></pre>
  
  <p>or other way might be to pass these <code>msg1</code> and <code>msg2</code> to a function and print it using <code>vfprintf()</code>.
  Probably, The second method would have run time overhead. So, I am just wondering what could be better way of doing this?</p>
  
  <p>E.g. A use case might be that the code need to be compiled with <code>info</code> and <code>debug</code> flags. <code>info</code> might be user related messages and <code>debug</code> for debugging purpose.
  Any suggestions? </p>