Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / log / src / init_from_stream.cpp
1 /*
2  *          Copyright Andrey Semashev 2007 - 2014.
3  * Distributed under the Boost Software License, Version 1.0.
4  *    (See accompanying file LICENSE_1_0.txt or copy at
5  *          http://www.boost.org/LICENSE_1_0.txt)
6  */
7 /*!
8  * \file   init_from_stream.cpp
9  * \author Andrey Semashev
10  * \date   22.03.2008
11  *
12  * \brief  This header is the Boost.Log library implementation, see the library documentation
13  *         at http://www.boost.org/doc/libs/release/libs/log/doc/html/index.html.
14  */
15
16 #ifndef BOOST_LOG_WITHOUT_SETTINGS_PARSERS
17
18 #include <boost/log/detail/config.hpp>
19 #include <boost/log/utility/setup/from_settings.hpp>
20 #include <boost/log/utility/setup/settings_parser.hpp>
21 #include <boost/log/detail/header.hpp>
22
23 namespace boost {
24
25 BOOST_LOG_OPEN_NAMESPACE
26
27 //! The function initializes the logging library from a stream containing logging settings
28 template< typename CharT >
29 void init_from_stream(std::basic_istream< CharT >& strm)
30 {
31     init_from_settings(parse_settings(strm));
32 }
33
34 #ifdef BOOST_LOG_USE_CHAR
35 template BOOST_LOG_SETUP_API void init_from_stream< char >(std::basic_istream< char >& strm);
36 #endif
37 #ifdef BOOST_LOG_USE_WCHAR_T
38 template BOOST_LOG_SETUP_API void init_from_stream< wchar_t >(std::basic_istream< wchar_t >& strm);
39 #endif
40
41 BOOST_LOG_CLOSE_NAMESPACE // namespace log
42
43 } // namespace boost
44
45 #include <boost/log/detail/footer.hpp>
46
47 #endif // BOOST_LOG_WITHOUT_SETTINGS_PARSERS