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 make_record.hpp 9 * \author Andrey Semashev 10 * \date 18.03.2009 11 * 12 * \brief This header contains a helper function make_record that creates a log record with the specified attributes. 13 */ 14 15 #ifndef BOOST_LOG_TESTS_MAKE_RECORD_HPP_INCLUDED_ 16 #define BOOST_LOG_TESTS_MAKE_RECORD_HPP_INCLUDED_ 17 18 #include <boost/move/utility_core.hpp> 19 #include <boost/log/core.hpp> 20 #include <boost/log/attributes/attribute_set.hpp> 21 make_record(boost::log::attribute_set const & src_attrs=boost::log::attribute_set ())22inline boost::log::record make_record(boost::log::attribute_set const& src_attrs = boost::log::attribute_set()) 23 { 24 return boost::log::core::get()->open_record(src_attrs); 25 } 26 make_record_view(boost::log::attribute_set const & src_attrs=boost::log::attribute_set ())27inline boost::log::record_view make_record_view(boost::log::attribute_set const& src_attrs = boost::log::attribute_set()) 28 { 29 return make_record(src_attrs).lock(); 30 } 31 32 #endif // BOOST_LOG_TESTS_MAKE_RECORD_HPP_INCLUDED_ 33