File indexing completed on 2025-01-18 09:39:27
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef BOOST_LOG_UTILITY_SETUP_COMMON_ATTRIBUTES_HPP_INCLUDED_
0016 #define BOOST_LOG_UTILITY_SETUP_COMMON_ATTRIBUTES_HPP_INCLUDED_
0017
0018 #include <iostream>
0019 #include <boost/log/detail/config.hpp>
0020 #include <boost/log/core/core.hpp>
0021 #include <boost/log/attributes/clock.hpp>
0022 #include <boost/log/attributes/counter.hpp>
0023 #include <boost/log/attributes/current_process_id.hpp>
0024 #if !defined(BOOST_LOG_NO_THREADS)
0025 #include <boost/log/attributes/current_thread_id.hpp>
0026 #endif
0027 #include <boost/log/detail/default_attribute_names.hpp>
0028 #include <boost/log/detail/header.hpp>
0029
0030 #ifdef BOOST_HAS_PRAGMA_ONCE
0031 #pragma once
0032 #endif
0033
0034 namespace boost {
0035
0036 BOOST_LOG_OPEN_NAMESPACE
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051 inline void add_common_attributes()
0052 {
0053 shared_ptr< core > pCore = core::get();
0054 pCore->add_global_attribute(
0055 aux::default_attribute_names::line_id(),
0056 attributes::counter< unsigned int >(1));
0057 pCore->add_global_attribute(
0058 aux::default_attribute_names::timestamp(),
0059 attributes::local_clock());
0060 pCore->add_global_attribute(
0061 aux::default_attribute_names::process_id(),
0062 attributes::current_process_id());
0063 #if !defined(BOOST_LOG_NO_THREADS)
0064 pCore->add_global_attribute(
0065 aux::default_attribute_names::thread_id(),
0066 attributes::current_thread_id());
0067 #endif
0068 }
0069
0070 BOOST_LOG_CLOSE_NAMESPACE
0071
0072 }
0073
0074 #include <boost/log/detail/footer.hpp>
0075
0076 #endif