title: Boost log - formatting with severity_channel_logger
body: <p>I have seen several examples with formatters, but those used custom defined attributes.</p>
  
  <p>How do I specify format for the <code>severity_channel_logger</code>? What I get now is:</p>
  
  <pre><code>[2015-07-20 11:53:09.879305] [0x00007f047b525740] [trace]   Bla, bla bla, bla bla bla.
  [2015-07-20 11:53:09.879370] [0x00007f047b525740] [trace]   Bla, bla bla, bla bla bla.
  [2015-07-20 11:53:09.879376] [0x00007f047b525740] [fatal]   Bla, bla bla, bla bla bla.
  </code></pre>
  
  <p>logger.h</p>
  
  <pre><code>#ifndef LOGGER_H_
  #define LOGGER_H_
  
  #include &lt;boost/log/trivial.hpp&gt;
  #include &lt;boost/log/core.hpp&gt;
  #include &lt;boost/log/sources/global_logger_storage.hpp&gt;
  #include &lt;boost/log/sources/record_ostream.hpp&gt;
  #include &lt;boost/log/sources/channel_feature.hpp&gt;
  #include &lt;boost/log/sources/severity_channel_logger.hpp&gt;
  
  #include &lt;string&gt;
  
  namespace Logging {
  
  typedef boost::log::sources::severity_channel_logger&lt;boost::log::trivial::severity_level,std::string&gt; LoggerType;
  
  BOOST_LOG_GLOBAL_LOGGER(clogger,LoggerType)
  
  } // namespace Logging
  
  #endif
  </code></pre>
  
  <p>logger.cpp</p>
  
  <pre><code>#include "logger.h"
  #include &lt;memory&gt;
  
  #include &lt;boost/log/core/core.hpp&gt;
  #include &lt;boost/log/expressions/formatters/date_time.hpp&gt;
  #include &lt;boost/log/expressions.hpp&gt;
  #include &lt;boost/log/sinks/sync_frontend.hpp&gt;
  #include &lt;boost/log/sinks/text_ostream_backend.hpp&gt;
  #include &lt;boost/log/sources/severity_logger.hpp&gt;
  #include &lt;boost/log/support/date_time.hpp&gt;
  #include &lt;boost/core/null_deleter.hpp&gt;
  #include &lt;boost/log/utility/setup/common_attributes.hpp&gt;
  #include &lt;boost/make_shared.hpp&gt;
  #include &lt;boost/shared_ptr.hpp&gt;
  
  using namespace Logging;
  
  BOOST_LOG_GLOBAL_LOGGER_INIT(clogger, LoggerType)
  {
      boost::log::sources::severity_channel_logger&lt; boost::log::trivial::severity_level, std::string &gt; lg;
      return lg;
  }
  </code></pre>
  
  <p>main.cpp</p>
  
  <pre><code>#include "logger.h"
  #include &lt;boost/log/attributes/named_scope.hpp&gt;
  using namespace Logging;
  
  int main()
  {
      BOOST_LOG_FUNCTION();
      BOOST_LOG(clogger::get()) &lt;&lt; "Bla, bla bla, bla bla bla.";
      BOOST_LOG_CHANNEL(clogger::get(),"standard") &lt;&lt; "Bla, bla bla, bla bla bla.";
      BOOST_LOG_CHANNEL_SEV(clogger::get(),"standard",boost::log::trivial::fatal) &lt;&lt; "Bla, bla bla, bla bla bla.";
  }
  </code></pre>