title: C++ logging class instance identifier
body: <p>In my project, some classes are instantiated more than once. Each class logs some events. The logging method is a generic one used all around the project and it uses the standard <em>cout</em>. The log message contains the time, name of the class, name of the method, a variable value, and a custom message.</p>
  
  <p>The disadvantage is that the log is not instance specific. I do not know which instance of the class wrote the log.</p>
  
  <p>Is there a nice way to solve this problem without adding additional static members as instance counters to the classes? I am using boost and C++11. Maybe boost has something that might help.</p>
  
  <p>The only solution I can think of is to include the instance address (this) to the log.</p>