Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
basic_logger.hpp File Reference
#include <exception>
#include <utility>
#include <ostream>
#include <boost/assert.hpp>
#include <boost/move/core.hpp>
#include <boost/move/utility.hpp>
#include <boost/utility/addressof.hpp>
#include <boost/preprocessor/facilities/empty.hpp>
#include <boost/preprocessor/facilities/identity.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/preprocessor/seq/enum.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/parameter_tools.hpp>
#include <boost/log/attributes/attribute_set.hpp>
#include <boost/log/attributes/attribute_name.hpp>
#include <boost/log/attributes/attribute.hpp>
#include <boost/log/core/core.hpp>
#include <boost/log/core/record.hpp>
#include <boost/log/sources/features.hpp>
#include <boost/log/sources/threading_models.hpp>
#include <boost/log/detail/header.hpp>
#include <boost/log/detail/footer.hpp>
Include dependency graph for basic_logger.hpp:
This graph shows which files directly or indirectly include this file:

Classes

class  boost::sources::basic_logger< CharT, FinalT, ThreadingModelT >
 Basic logger class. More...
 
class  boost::sources::basic_composite_logger< CharT, FinalT, ThreadingModelT, FeaturesT >
 A composite logger that inherits a number of features. More...
 
class  boost::sources::basic_composite_logger< CharT, FinalT, single_thread_model, FeaturesT >
 An optimized composite logger version with no multithreading support. More...
 

Namespaces

 boost
 Duration formatting facet for input.
 
 boost::sources
 

Macros

#define BOOST_LOG_FORWARD_LOGGER_CONSTRUCTORS_IMPL(class_type, typename_keyword)
 
#define BOOST_LOG_FORWARD_LOGGER_CONSTRUCTORS(class_type)   BOOST_LOG_FORWARD_LOGGER_CONSTRUCTORS_IMPL(class_type, BOOST_PP_EMPTY)
 
#define BOOST_LOG_FORWARD_LOGGER_CONSTRUCTORS_TEMPLATE(class_type)   BOOST_LOG_FORWARD_LOGGER_CONSTRUCTORS_IMPL(class_type, BOOST_PP_IDENTITY(typename))
 
#define BOOST_LOG_FORWARD_LOGGER_ASSIGNMENT(class_type)
 
#define BOOST_LOG_FORWARD_LOGGER_ASSIGNMENT_TEMPLATE(class_type)
 
#define BOOST_LOG_FORWARD_LOGGER_MEMBERS(class_type)
 
#define BOOST_LOG_FORWARD_LOGGER_MEMBERS_TEMPLATE(class_type)
 
#define BOOST_LOG_DECLARE_LOGGER_TYPE(type_name, char_type, base_seq, threading)
 The macro declares a logger class that inherits a number of base classes. More...
 

Functions

template<typename CharT , typename FinalT , typename ThreadingModelT >
void boost::sources::swap (basic_logger< CharT, FinalT, ThreadingModelT > &left, basic_logger< CharT, FinalT, ThreadingModelT > &right)
 Free-standing swap for all loggers. More...
 

Detailed Description

Author
Andrey Semashev
Date
08.03.2007

The header contains implementation of a base class for loggers. Convenience macros for defining custom loggers are also provided.

Macro Definition Documentation

#define BOOST_LOG_DECLARE_LOGGER_TYPE (   type_name,
  char_type,
  base_seq,
  threading 
)
Value:
class type_name :\
public ::boost::log::sources::basic_composite_logger<\
char_type,\
type_name,\
threading,\
::boost::log::sources::features< BOOST_PP_SEQ_ENUM(base_seq) >\
>\
{\
}
#define BOOST_LOG_FORWARD_LOGGER_MEMBERS(class_type)
Definition: basic_logger.hpp:642

The macro declares a logger class that inherits a number of base classes.

Parameters
type_nameThe name of the logger class to declare
char_typeThe character type of the logger. Either char or wchar_t expected.
base_seqA Boost.Preprocessor sequence of type identifiers of the base classes templates
threadingA threading model class
#define BOOST_LOG_FORWARD_LOGGER_ASSIGNMENT (   class_type)
Value:
public:\
{\
return class_type::logger_base::assign(static_cast< class_type const& >(that));\
}\
{\
BOOST_LOG_EXPR_IF_MT(::boost::log::aux::exclusive_lock_guard< class_type::threading_model > lock(this->get_threading_model());)\
this->swap_unlocked(that);\
return *this;\
}
BOOST_PYTHON_DECL type_handle class_type()
void assign(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a)
Definition: function_template.hpp:797
cpp_int_backend & operator=(const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &other)
Definition: cpp_int.hpp:1117
#define BOOST_COPY_ASSIGN_REF(TYPE)
This macro is used to achieve portable syntax in copy assignment for classes marked as BOOST_COPYABLE...
Definition: core.hpp:332
void lock(MutexType1 &m1, MutexType2 &m2)
Definition: lock_algorithms.hpp:170
#define BOOST_RV_REF(TYPE)
This macro is used to achieve portable syntax in move constructors and assignments for classes marked...
Definition: core.hpp:307
#define BOOST_LOG_FORWARD_LOGGER_ASSIGNMENT_TEMPLATE (   class_type)
Value:
public:\
{\
return class_type::logger_base::assign(static_cast< class_type const& >(that));\
}\
{\
BOOST_LOG_EXPR_IF_MT(::boost::log::aux::exclusive_lock_guard< typename class_type::threading_model > lock(this->get_threading_model());)\
this->swap_unlocked(that);\
return *this;\
}
BOOST_PYTHON_DECL type_handle class_type()
void assign(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a)
Definition: function_template.hpp:797
cpp_int_backend & operator=(const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &other)
Definition: cpp_int.hpp:1117
#define BOOST_COPY_ASSIGN_REF(TYPE)
This macro is used to achieve portable syntax in copy assignment for classes marked as BOOST_COPYABLE...
Definition: core.hpp:332
void lock(MutexType1 &m1, MutexType2 &m2)
Definition: lock_algorithms.hpp:170
#define BOOST_RV_REF(TYPE)
This macro is used to achieve portable syntax in move constructors and assignments for classes marked...
Definition: core.hpp:307
#define BOOST_LOG_FORWARD_LOGGER_CONSTRUCTORS (   class_type)    BOOST_LOG_FORWARD_LOGGER_CONSTRUCTORS_IMPL(class_type, BOOST_PP_EMPTY)
#define BOOST_LOG_FORWARD_LOGGER_CONSTRUCTORS_IMPL (   class_type,
  typename_keyword 
)
Value:
public:\
class_type(class_type const& that) : class_type::logger_base(\
static_cast< typename_keyword() class_type::logger_base const& >(that)) {}\
::boost::move(static_cast< typename_keyword() class_type::logger_base& >(that))) {}\
BOOST_LOG_PARAMETRIZED_CONSTRUCTORS_FORWARD(class_type, class_type::logger_base)\
Duration formatting facet for input.
Definition: accumulators_fwd.hpp:55
void const
Definition: is_convertible.hpp:460
#define BOOST_DEFAULTED_FUNCTION(fun, body)
Definition: suffix.hpp:674
BOOST_PYTHON_DECL type_handle class_type()
enable_if< typename is_any_mutable_polygon_type< T >::type, T >::type & move(T &polygon, orientation_2d orient, typename polygon_traits< T >::coordinate_type displacement)
Definition: polygon_traits.hpp:653
#define BOOST_RV_REF(TYPE)
This macro is used to achieve portable syntax in move constructors and assignments for classes marked...
Definition: core.hpp:307
#define BOOST_LOG_FORWARD_LOGGER_CONSTRUCTORS_TEMPLATE (   class_type)    BOOST_LOG_FORWARD_LOGGER_CONSTRUCTORS_IMPL(class_type, BOOST_PP_IDENTITY(typename))
#define BOOST_LOG_FORWARD_LOGGER_MEMBERS (   class_type)
Value:
#define BOOST_LOG_FORWARD_LOGGER_CONSTRUCTORS(class_type)
Definition: basic_logger.hpp:610
BOOST_PYTHON_DECL type_handle class_type()
#define BOOST_LOG_FORWARD_LOGGER_ASSIGNMENT(class_type)
Definition: basic_logger.hpp:616
#define BOOST_COPYABLE_AND_MOVABLE(TYPE)
This macro marks a type as copyable and movable.
Definition: core.hpp:283
#define BOOST_LOG_FORWARD_LOGGER_MEMBERS_TEMPLATE (   class_type)
Value:
#define BOOST_LOG_FORWARD_LOGGER_ASSIGNMENT_TEMPLATE(class_type)
Definition: basic_logger.hpp:629
BOOST_PYTHON_DECL type_handle class_type()
#define BOOST_COPYABLE_AND_MOVABLE(TYPE)
This macro marks a type as copyable and movable.
Definition: core.hpp:283
#define BOOST_LOG_FORWARD_LOGGER_CONSTRUCTORS_TEMPLATE(class_type)
Definition: basic_logger.hpp:613