Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85710 - trunk/libs/log/src
From: andrey.semashev_at_[hidden]
Date: 2013-09-16 13:43:45


Author: andysem
Date: 2013-09-16 13:43:45 EDT (Mon, 16 Sep 2013)
New Revision: 85710
URL: http://svn.boost.org/trac/boost/changeset/85710

Log:
Attempt to workaround ticket #8642.

Text files modified:
   trunk/libs/log/src/core.cpp | 5 +++++
   1 files changed, 5 insertions(+), 0 deletions(-)

Modified: trunk/libs/log/src/core.cpp
==============================================================================
--- trunk/libs/log/src/core.cpp Mon Sep 16 13:24:30 2013 (r85709)
+++ trunk/libs/log/src/core.cpp 2013-09-16 13:43:45 EDT (Mon, 16 Sep 2013) (r85710)
@@ -20,6 +20,7 @@
 #include <algorithm>
 #include <boost/cstdint.hpp>
 #include <boost/assert.hpp>
+#include <boost/filesystem/path.hpp>
 #include <boost/smart_ptr/weak_ptr.hpp>
 #include <boost/smart_ptr/shared_ptr.hpp>
 #include <boost/smart_ptr/make_shared_object.hpp>
@@ -251,6 +252,10 @@
         m_default_sink(boost::make_shared< sinks::aux::default_sink >()),
         m_enabled(true)
     {
+ // Workaround for https://svn.boost.org/trac/boost/ticket/8642
+ // Initialize global locale in Boost.Filesystem early, so that it is still available while the logging core is destroyed.
+ // Note that this only helps in the simplest case, when the core is not kept alive by a shared_ptr saved by user.
+ filesystem::path::codecvt();
     }
 
     //! Invokes sink-specific filter and adds the sink to the record if the filter passes the log record


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk