Boost C++ Libraries: Ticket #13257: Log attributes passed as arguments to open_record are ignored https://svn.boost.org/trac10/ticket/13257 <p> Why does boost::log::sources::basic_logger::open_record_unlocked(ArgsT const&amp;) ignore its argument when calling boost::log::core::open_record()? </p> <div class="wiki-code"><div class="code"><pre> <span class="cm">/*!</span> <span class="cm"> * Unlocked \c open_record</span> <span class="cm"> */</span> <span class="k">template</span><span class="o">&lt;</span> <span class="k">typename</span> <span class="n">ArgsT</span> <span class="o">&gt;</span> <span class="n">record</span> <span class="n">open_record_unlocked</span><span class="p">(</span><span class="n">ArgsT</span> <span class="k">const</span><span class="o">&amp;</span><span class="p">)</span> <span class="p">{</span> <span class="k">return</span> <span class="n">m_pCore</span><span class="o">-&gt;</span><span class="n">open_record</span><span class="p">(</span><span class="n">m_Attributes</span><span class="p">);</span> <span class="p">}</span> </pre></div></div><p> The boost::log::sources::logger_mt::open_record() eventually passes the attributes to this function where they are summarily ignored. How is something as fundamental to the Boost Log library as BOOST_LOG_WITH_PARAMETERS() supposed to work! It doesn't, by the way. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13257 Trac 1.4.3 Thomas M. Bernal <tbernal@…> Fri, 13 Oct 2017 00:13:38 GMT <link>https://svn.boost.org/trac10/ticket/13257#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13257#comment:1</guid> <description> <p> It seems the severity_logger cheats! </p> <div class="wiki-code"><div class="code"><pre> <span class="n">record</span> <span class="nf">open_record_unlocked</span><span class="p">(</span><span class="n">ArgsT</span> <span class="k">const</span><span class="o">&amp;</span> <span class="n">args</span><span class="p">)</span> <span class="p">{</span> <span class="n">m_SeverityAttr</span><span class="p">.</span><span class="n">set_value</span><span class="p">(</span><span class="n">args</span><span class="p">[</span><span class="n">keywords</span><span class="o">::</span><span class="n">severity</span> <span class="o">|</span> <span class="n">m_DefaultSeverity</span><span class="p">]);</span> <span class="k">return</span> <span class="n">base_type</span><span class="o">::</span><span class="n">open_record_unlocked</span><span class="p">(</span><span class="n">args</span><span class="p">);</span> <span class="p">}</span> </pre></div></div><p> So you are telling me that if I want to add attributes in the call to <code>open_record</code> that I need to implement my own logger and cheat? This is not the way the library appears to be in the tutorial. The tutorial makes it seem that anything passed into <code>open_record</code> will get combined with the logger's attributes before being sent to the core. This is not only very deceiving but highly cryptic. </p> </description> <category>Ticket</category> </item> <item> <author>Thomas M. Bernal <tbernal@…></author> <pubDate>Mon, 16 Oct 2017 12:26:04 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/13257#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13257#comment:2</guid> <description> <p> Never mind. They're parameters not attributes. That was not clear from the documentation, and my not being familiar with boost parameters. </p> </description> <category>Ticket</category> </item> <item> <author>Thomas M. Bernal <tbernal@…></author> <pubDate>Mon, 16 Oct 2017 12:26:31 GMT</pubDate> <title>severity changed https://svn.boost.org/trac10/ticket/13257#comment:3 https://svn.boost.org/trac10/ticket/13257#comment:3 <ul> <li><strong>severity</strong> <span class="trac-field-old">Showstopper</span> → <span class="trac-field-new">Not Applicable</span> </li> </ul> Ticket