Boost C++ Libraries: Ticket #11691: Boost.Log does not recognize file name pattern that includes datetime format specifiers https://svn.boost.org/trac10/ticket/11691 <p> Running the following example <a href="http://www.boost.org/doc/libs/1_59_0/libs/log/example/doc/sinks_xml_file.cpp">http://www.boost.org/doc/libs/1_59_0/libs/log/example/doc/sinks_xml_file.cpp</a> with file name pattern "%Y%m%d_%H%M%S_%5N.xml" results log files having names like "2015-Sep-29 08:42:02.330324" (using Boost 1.59). </p> <p> If datetime specifiers are not included in file name pattern, everything looks good. For example, running with file name pattern "log_%5N.xml" generates logs in form "log_00001.xml". </p> <p> Compiling the same example with Boost 1.58 gives results as expected. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11691 Trac 1.4.3 Andrey Semashev Sun, 04 Oct 2015 15:43:51 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11691#comment:1 https://svn.boost.org/trac10/ticket/11691#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Thanks for reporting this. The problem is that Boost.<a class="missing wiki">DateTime</a> facets that are used for formatting have hidden visibility when Boost.Log is compiled. Because of that date/time formatting fails. </p> <p> I've added a workaround for this problem in <a class="ext-link" href="https://github.com/boostorg/log/commit/284d5e6139460788ad011bfc05085cd6d624db78"><span class="icon">​</span>https://github.com/boostorg/log/commit/284d5e6139460788ad011bfc05085cd6d624db78</a>. Fix in Boost.<a class="missing wiki">DateTime</a> is also needed, but I'll create a separate ticket for this. </p> Ticket Andrey Semashev Sun, 04 Oct 2015 15:54:57 GMT <link>https://svn.boost.org/trac10/ticket/11691#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11691#comment:2</guid> <description> <p> Boost.<a class="missing wiki">DateTime</a> ticket: <a class="new ticket" href="https://svn.boost.org/trac10/ticket/11707" title="#11707: Bugs: Locale facets have hidden visibility (new)">#11707</a>. </p> </description> <category>Ticket</category> </item> </channel> </rss>