1/*
2 * Copyright Andrey Semashev 2007 - 2015.
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/setup_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
23namespace boost {
24
25BOOST_LOG_OPEN_NAMESPACE
26
27//! The function initializes the logging library from a stream containing logging settings
28template< typename CharT >
29BOOST_LOG_SETUP_API 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
35template BOOST_LOG_SETUP_API void init_from_stream< char >(std::basic_istream< char >& strm);
36#endif
37#ifdef BOOST_LOG_USE_WCHAR_T
38template BOOST_LOG_SETUP_API void init_from_stream< wchar_t >(std::basic_istream< wchar_t >& strm);
39#endif
40
41BOOST_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
48

source code of boost/libs/log/src/setup/init_from_stream.cpp