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)
8 * \file default_attribute_names.cpp
9 * \author Andrey Semashev
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.
16 #include <boost/log/detail/config.hpp>
17 #include <boost/smart_ptr/shared_ptr.hpp>
18 #include <boost/log/detail/default_attribute_names.hpp>
19 #include <boost/log/detail/singleton.hpp>
20 #include <boost/log/detail/header.hpp>
24 BOOST_LOG_OPEN_NAMESPACE
28 namespace default_attribute_names
{
30 BOOST_LOG_ANONYMOUS_NAMESPACE
{
33 public lazy_singleton
< names
, shared_ptr
< names
> >
36 typedef lazy_singleton
< names
, shared_ptr
< names
> > base_type
;
38 #if !defined(BOOST_LOG_BROKEN_FRIEND_TEMPLATE_SPECIALIZATIONS)
39 friend class lazy_singleton
< names
, shared_ptr
< names
> >;
41 friend class base_type
;
45 const attribute_name severity
;
46 const attribute_name channel
;
47 const attribute_name message
;
48 const attribute_name line_id
;
49 const attribute_name timestamp
;
50 const attribute_name process_id
;
51 const attribute_name thread_id
;
59 timestamp("TimeStamp"),
60 process_id("ProcessID"),
65 static void init_instance()
67 get_instance().reset(new names());
73 return *base_type::get();
79 BOOST_LOG_API attribute_name
severity()
81 return names::get().severity
;
84 BOOST_LOG_API attribute_name
channel()
86 return names::get().channel
;
89 BOOST_LOG_API attribute_name
message()
91 return names::get().message
;
94 BOOST_LOG_API attribute_name
line_id()
96 return names::get().line_id
;
99 BOOST_LOG_API attribute_name
timestamp()
101 return names::get().timestamp
;
104 BOOST_LOG_API attribute_name
process_id()
106 return names::get().process_id
;
109 BOOST_LOG_API attribute_name
thread_id()
111 return names::get().thread_id
;
114 } // namespace default_attribute_names
118 BOOST_LOG_CLOSE_NAMESPACE
// namespace log
122 #include <boost/log/detail/footer.hpp>