title: Adding generic logging support in C++ shared library
body: <p>I'm writing a c++ shared library that is intended to be used by other library or executable. What is the best way to add a generic logging in my library? Ideally I'd like to adapt my library to logging functionality chosen by the library's user. 
  Suppose i  have a class in my library </p>
  
  <pre><code>class A {
    public: 
    void method(string param1, int param2);
  }   
  
  void A::method(string param1, int param2){
    /* i want to log values of param1 and param2, 
       but actual logging method must be defined outside of my library. 
       Maybe some kind of macro should help here. */ 
     /*e.g.*/  GENERICLOG_DEBUG("param1=" + param1+ " param2="+param1);
     /*if so, what that macro body should look like ? */
  }
  </code></pre>
  
  <p>I don't want to make my library tied to any log4XXX specific API. </p>