title: Python logger.debug converting arguments to string without logging
body: <p>I'm optimizing a Python program that performs some sort of calculation. It uses NumPy quite extensively. The code is sprinkled with <code>logger.debug</code> calls (logger is the standard Python log object).</p>
  
  <p>When I run cProfile I see that Numpy's function that converts an array to string takes 50% of the execution time. This is surprising, since there is no handler that outputs messages as the DEBUG level, only INFO and above.</p>
  
  <p>Why is the logger converting its arguments to string even though nobody is going to use this string? Is there a way to prevent it (other than not performing the logger calls)?</p>