title: how to set boost to log different data in 2 different files
body: <p>I am trying since a few days to set up c++ boost to log different data in 2 different files .
  What I managed to get is different files , who all share the same content
  The code bellow creates in the log folder , 2 files file.txt and file2.txt with the same content:</p>
  
  <pre><code>file.txt 
  
  0: [2019-Feb-14 19:39:01.997479] - thread 2
  1: [2019-Feb-14 19:39:02.035582] - thread 1
  
  file2.txt
  0: [2019-Feb-14 19:39:01.997479] - thread 2
  1: [2019-Feb-14 19:39:02.035582] - thread 1
  
  
  class logger
  {
      src::logger_mt lg;
  public:
      logger(std::string filename)
      {
          // Create a text file sink
          typedef sinks::synchronous_sink&lt; sinks::text_multifile_backend &gt; file_sink;
          shared_ptr&lt; file_sink &gt; sink(new file_sink);
  
  
          // Set up how the file names will be generated
          sink-&gt;locked_backend()-&gt;set_file_name_composer(sinks::file::as_file_name_composer(
              expr::stream &lt;&lt; "logs/" &lt;&lt; filename));
  
          // Set the log record formatter
          sink-&gt;set_formatter
          (
              expr::format("%1%: [%2%] - %3%")
              % expr::attr&lt; unsigned int &gt;("RecordID")
              % expr::attr&lt; boost::posix_time::ptime &gt;("TimeStamp")
              % expr::smessage
          );
  
          // Add it to the core
          logging::core::get()-&gt;add_sink(sink);
  
  
          // Add some attributes too
          logging::core::get()-&gt;add_global_attribute("TimeStamp", attrs::local_clock());
          logging::core::get()-&gt;add_global_attribute("RecordID", attrs::counter&lt; unsigned int &gt;());
  
      }
      void log(std::string message)
      {
          BOOST_LOG(lg) &lt;&lt; message;
      }    
  };
  logger logger1("file2.txt");
  logger logger2("file.txt");
  // This function is executed in a separate thread
  int main(int argc, char* argv[])
  {
      logger2.log("thread 2");
      logger1.log("thread 1");
      return 0;
  }
  </code></pre>
  
  <p>I know is a basic question , but i read all the examples from the boost distribution libs\log\example and i couldnt find anything similar. 
  The help is appreciated.</p>