Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
scoped_attribute.hpp File Reference
#include <utility>
#include <boost/move/core.hpp>
#include <boost/move/utility.hpp>
#include <boost/utility/addressof.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/core/core.hpp>
#include <boost/log/sources/basic_logger.hpp>
#include <boost/log/attributes/attribute.hpp>
#include <boost/log/attributes/attribute_set.hpp>
#include <boost/log/attributes/attribute_name.hpp>
#include <boost/log/attributes/constant.hpp>
#include <boost/log/utility/unused_variable.hpp>
#include <boost/log/utility/unique_identifier_name.hpp>
#include <boost/log/detail/header.hpp>
#include <boost/log/detail/footer.hpp>
Include dependency graph for scoped_attribute.hpp:
This graph shows which files directly or indirectly include this file:

Classes

class  boost::aux::attribute_scope_guard
 A base class for all scoped attribute guards. More...
 
class  boost::aux::scoped_logger_attribute< LoggerT >
 A scoped logger attribute guard. More...
 
class  boost::aux::scoped_thread_attribute
 A scoped thread-specific attribute guard. More...
 

Namespaces

 boost
 Duration formatting facet for input.
 
 boost::aux
 

Macros

#define BOOST_LOG_SCOPED_LOGGER_ATTR_INTERNAL(logger, attr_name, attr, sentry_var_name)
 
#define BOOST_LOG_SCOPED_LOGGER_ATTR(logger, attr_name, attr)
 The macro sets a scoped logger-wide attribute in a more compact way. More...
 
#define BOOST_LOG_SCOPED_LOGGER_TAG(logger, attr_name, attr_value)   BOOST_LOG_SCOPED_LOGGER_ATTR(logger, attr_name, ::boost::log::attributes::make_constant(attr_value))
 The macro sets a scoped logger-wide tag in a more compact way. More...
 
#define BOOST_LOG_SCOPED_THREAD_ATTR_INTERNAL(attr_name, attr, sentry_var_name)
 
#define BOOST_LOG_SCOPED_THREAD_ATTR(attr_name, attr)
 The macro sets a scoped thread-wide attribute in a more compact way. More...
 
#define BOOST_LOG_SCOPED_THREAD_TAG(attr_name, attr_value)   BOOST_LOG_SCOPED_THREAD_ATTR(attr_name, ::boost::log::attributes::make_constant(attr_value))
 The macro sets a scoped thread-wide tag in a more compact way. More...
 

Typedefs

typedef
aux::attribute_scope_guard
const & 
boost::scoped_attribute
 Scoped attribute guard type. More...
 

Functions

template<typename LoggerT >
BOOST_FORCEINLINE
aux::scoped_logger_attribute
< LoggerT > 
boost::add_scoped_logger_attribute (LoggerT &l, attribute_name const &name, attribute const &attr)
 Registers an attribute in the logger. More...
 
BOOST_FORCEINLINE
aux::scoped_thread_attribute 
boost::add_scoped_thread_attribute (attribute_name const &name, attribute const &attr)
 Registers a thread-specific attribute. More...
 

Detailed Description

Author
Andrey Semashev
Date
13.05.2007

The header contains definition of facilities to define scoped attributes.

Macro Definition Documentation

#define BOOST_LOG_SCOPED_LOGGER_ATTR (   logger,
  attr_name,
  attr 
)
Value:
logger,\
attr_name,\
attr,\
BOOST_LOG_UNIQUE_IDENTIFIER_NAME(_boost_log_scoped_logger_attr_sentry_))
#define BOOST_LOG_SCOPED_LOGGER_ATTR_INTERNAL(logger, attr_name, attr, sentry_var_name)
Definition: scoped_attribute.hpp:137
attr_gen const attr
Definition: attr.hpp:132
#define BOOST_LOG_UNIQUE_IDENTIFIER_NAME(prefix)
Definition: unique_identifier_name.hpp:47

The macro sets a scoped logger-wide attribute in a more compact way.

#define BOOST_LOG_SCOPED_LOGGER_ATTR_INTERNAL (   logger,
  attr_name,
  attr,
  sentry_var_name 
)
Value:
= ::boost::log::add_scoped_logger_attribute(logger, attr_name, (attr)));
#define BOOST_LOG_UNUSED_VARIABLE(type, var, initializer)
The macro suppresses compiler warnings for var being unused.
Definition: unused_variable.hpp:47
aux::attribute_scope_guard const & scoped_attribute
Scoped attribute guard type.
Definition: scoped_attribute.hpp:51
attr_gen const attr
Definition: attr.hpp:132
BOOST_FORCEINLINE aux::scoped_logger_attribute< LoggerT > add_scoped_logger_attribute(LoggerT &l, attribute_name const &name, attribute const &attr)
Registers an attribute in the logger.
Definition: scoped_attribute.hpp:125
#define BOOST_LOG_SCOPED_LOGGER_TAG (   logger,
  attr_name,
  attr_value 
)    BOOST_LOG_SCOPED_LOGGER_ATTR(logger, attr_name, ::boost::log::attributes::make_constant(attr_value))

The macro sets a scoped logger-wide tag in a more compact way.

#define BOOST_LOG_SCOPED_THREAD_ATTR (   attr_name,
  attr 
)
Value:
attr_name,\
attr,\
BOOST_LOG_UNIQUE_IDENTIFIER_NAME(_boost_log_scoped_thread_attr_sentry_))
#define BOOST_LOG_SCOPED_THREAD_ATTR_INTERNAL(attr_name, attr, sentry_var_name)
Definition: scoped_attribute.hpp:230
attr_gen const attr
Definition: attr.hpp:132
#define BOOST_LOG_UNIQUE_IDENTIFIER_NAME(prefix)
Definition: unique_identifier_name.hpp:47

The macro sets a scoped thread-wide attribute in a more compact way.

#define BOOST_LOG_SCOPED_THREAD_ATTR_INTERNAL (   attr_name,
  attr,
  sentry_var_name 
)
Value:
#define BOOST_LOG_UNUSED_VARIABLE(type, var, initializer)
The macro suppresses compiler warnings for var being unused.
Definition: unused_variable.hpp:47
aux::attribute_scope_guard const & scoped_attribute
Scoped attribute guard type.
Definition: scoped_attribute.hpp:51
BOOST_FORCEINLINE aux::scoped_thread_attribute add_scoped_thread_attribute(attribute_name const &name, attribute const &attr)
Registers a thread-specific attribute.
Definition: scoped_attribute.hpp:218
attr_gen const attr
Definition: attr.hpp:132
#define BOOST_LOG_SCOPED_THREAD_TAG (   attr_name,
  attr_value 
)    BOOST_LOG_SCOPED_THREAD_ATTR(attr_name, ::boost::log::attributes::make_constant(attr_value))

The macro sets a scoped thread-wide tag in a more compact way.