diff options
Diffstat (limited to 'boost/thread/caller_context.hpp')
-rw-r--r-- | boost/thread/caller_context.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/boost/thread/caller_context.hpp b/boost/thread/caller_context.hpp index 1e341686b0..dc50a05f97 100644 --- a/boost/thread/caller_context.hpp +++ b/boost/thread/caller_context.hpp @@ -1,4 +1,4 @@ -// (C) Copyright 2013 Vicente J. Botet Escriba +// (C) Copyright 2013,2015 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -12,6 +12,7 @@ #include <boost/thread/thread.hpp> #endif #include <boost/current_function.hpp> +#include <boost/io/ios_state.hpp> #include <iomanip> #include <boost/config/abi_prefix.hpp> @@ -43,9 +44,11 @@ namespace boost #endif { io::ios_flags_saver ifs(os); - os << ctx.filename << "[" + os << std::setw(50) << ctx.filename << "[" << std::setw(4) << std::right << std::dec<< ctx.lineno << "] "; +#if defined BOOST_THREAD_USES_LOG_CURRENT_FUNCTION os << ctx.func << " " ; +#endif } return os; } |