title: Properly overload operator << in Boost.Log
body: <p>In the <a href="http://www.boost.org/doc/libs/1_59_0/libs/log/doc/html/log/detailed/utilities.html#log.detailed.utilities.manipulators.to_log" rel="noreferrer">Boost.Log documentation</a>, it is said that</p>
  
  <blockquote>
    <p><strong>Note</strong></p>
    
    <p>The library uses <code>basic_formatting_ostream</code> stream type for record formatting, so when customizing attribute value formatting
    rules the <code>operator&lt;&lt;</code> must use <code>basic_formatting_ostream</code> instead of
    <code>std::ostream</code>.</p>
  </blockquote>
  
  <p>However, throughout the documentation, all I see is overloading <code>operator &lt;&lt;</code> on <code>std::ostream</code> rather than <code>basic_formatting_ostream</code> in the example code. For example, see the overload for the custom type <code>severity_level</code> <a href="http://www.boost.org/doc/libs/1_59_0/libs/log/example/doc/tutorial_attributes.cpp" rel="noreferrer">here</a>.</p>
  
  <p>According to my tests, the overloads on <code>std::ostream</code> and <code>basic_formatting_ostream</code> both worked fine. So, I'm wondering what are the advantages of overloading on one instead of the other.</p>