title: logging in c++ (performance considerations)
body: <p>I am new to cpp (come from Java).
  I am writing a cpp application. The application is performance critical.
  i looked for a logging framework and i found <a href="http://logging.apache.org/log4cxx/index.html" rel="nofollow">log4cxx</a>
  at the end of the linked above there is performance section that explain:</p>
  
  <blockquote>
    <p>When logging is turned off entirely or just for a set of levels, the
    cost of a log request consists of a method invocation plus an integer
    comparison</p>
  </blockquote>
  
  <p>I remember from old days in university that we used then with <code>#ifndf</code> to wrap logging.</p>
  
  <p>Questions:</p>
  
  <ol>
  <li><p>Is wrapping logging with <code>#ifndf</code> is still standard practice?</p></li>
  <li><p>Is there is something similar to the following pseudo-code?</p></li>
  </ol>
  
  
  
  <pre><code>logger.Log_Debug(() =&gt; { "My complicated log message " + thisFunctionTakesALongTime() + " will take no time" });
  </code></pre>