title: What is the best way for giving callback for logging ?
body: <p>I have third party library which calls an macro for logging. Inside that macro they are using fprintf for logging. 
  I am thinking about modifying the code to define a custom callback for logging, but I am not sure what will be best way.</p>
  
  <p>Solution I want is:</p>
  
  <ul>
  <li>User can define a callback for logging. </li>
  <li>If callback is not define use fprint. </li>
  </ul>
  
  <p>So I am looking for some type of static function with default definition which I can override if I want. </p>
  
  <p>What will be the best way of doing this ?
  As we can't overload static function so everyone needs to define their definition of the logging function. </p>