Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
global_logger_storage.hpp File Reference
#include <typeinfo>
#include <stdexcept>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/make_shared_object.hpp>
#include <boost/preprocessor/seq/enum.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/singleton.hpp>
#include <boost/log/detail/visible_type.hpp>
#include <boost/log/detail/header.hpp>
#include <boost/log/detail/footer.hpp>
Include dependency graph for global_logger_storage.hpp:
This graph shows which files directly or indirectly include this file:

Classes

struct  boost::sources::aux::logger_holder_base
 The base class for logger holders. More...
 
struct  boost::sources::aux::logger_holder< LoggerT >
 The actual logger holder class. More...
 
struct  boost::sources::aux::global_storage
 The class implements a global repository of tagged loggers. More...
 
struct  boost::sources::aux::logger_singleton< TagT >
 The class implements a logger singleton. More...
 

Namespaces

 boost
 Duration formatting facet for input.
 
 boost::sources
 
 boost::sources::aux
 

Macros

#define BOOST_LOG_GLOBAL_LOGGER(tag_name, logger)
 The macro forward-declares a global logger with a custom initialization. More...
 
#define BOOST_LOG_GLOBAL_LOGGER_INIT(tag_name, logger)   tag_name::logger_type tag_name::construct_logger()
 The macro defines a global logger initialization routine. More...
 
#define BOOST_LOG_GLOBAL_LOGGER_DEFAULT(tag_name, logger)
 The macro defines a global logger initializer that will default-construct the logger. More...
 
#define BOOST_LOG_GLOBAL_LOGGER_CTOR_ARGS(tag_name, logger, args)
 The macro defines a global logger initializer that will construct the logger with the specified constructor arguments. More...
 
#define BOOST_LOG_INLINE_GLOBAL_LOGGER_INIT(tag_name, logger)
 The macro declares a global logger with a custom initialization. More...
 
#define BOOST_LOG_INLINE_GLOBAL_LOGGER_DEFAULT(tag_name, logger)
 The macro declares a global logger that will be default-constructed. More...
 
#define BOOST_LOG_INLINE_GLOBAL_LOGGER_CTOR_ARGS(tag_name, logger, args)
 The macro declares a global logger that will be constructed with the specified arguments. More...
 

Functions

BOOST_LOG_API
BOOST_LOG_NORETURN void 
boost::sources::aux::throw_odr_violation (std::type_info const &tag_type, std::type_info const &logger_type, logger_holder_base const &registered)
 Throws the odr_violation exception. More...
 

Detailed Description

Author
Andrey Semashev
Date
21.04.2008

The header contains implementation of facilities to declare global loggers.

Macro Definition Documentation

#define BOOST_LOG_GLOBAL_LOGGER (   tag_name,
  logger 
)
Value:
struct tag_name\
{\
typedef logger logger_type;\
enum registration_line_t { registration_line = __LINE__ };\
static const char* registration_file() { return __FILE__; }\
static logger_type construct_logger();\
static inline logger_type& get()\
{\
}\
};
const T & get(const T *pa, std::ptrdiff_t k)
Definition: property_map.hpp:127
sources::severity_logger_mt< severity_level > logger_type
Trivial logger type.
Definition: trivial.hpp:74

The macro forward-declares a global logger with a custom initialization.

#define BOOST_LOG_GLOBAL_LOGGER_CTOR_ARGS (   tag_name,
  logger,
  args 
)
Value:
BOOST_LOG_GLOBAL_LOGGER_INIT(tag_name, logger)\
{\
}
#define BOOST_PP_SEQ_ENUM(seq)
Definition: enum.hpp:28
sources::severity_logger_mt< severity_level > logger_type
Trivial logger type.
Definition: trivial.hpp:74
detail::keywords< 1 > args(char const *name)
Definition: args.hpp:156
#define BOOST_LOG_GLOBAL_LOGGER_INIT(tag_name, logger)
The macro defines a global logger initialization routine.
Definition: global_logger_storage.hpp:162

The macro defines a global logger initializer that will construct the logger with the specified constructor arguments.

#define BOOST_LOG_GLOBAL_LOGGER_DEFAULT (   tag_name,
  logger 
)
Value:
BOOST_LOG_GLOBAL_LOGGER_INIT(tag_name, logger)\
{\
return logger_type();\
}
sources::severity_logger_mt< severity_level > logger_type
Trivial logger type.
Definition: trivial.hpp:74
#define BOOST_LOG_GLOBAL_LOGGER_INIT(tag_name, logger)
The macro defines a global logger initialization routine.
Definition: global_logger_storage.hpp:162

The macro defines a global logger initializer that will default-construct the logger.

#define BOOST_LOG_GLOBAL_LOGGER_INIT (   tag_name,
  logger 
)    tag_name::logger_type tag_name::construct_logger()

The macro defines a global logger initialization routine.

#define BOOST_LOG_INLINE_GLOBAL_LOGGER_CTOR_ARGS (   tag_name,
  logger,
  args 
)
Value:
{\
}
#define BOOST_LOG_INLINE_GLOBAL_LOGGER_INIT(tag_name, logger)
The macro declares a global logger with a custom initialization.
Definition: global_logger_storage.hpp:180
#define BOOST_PP_SEQ_ENUM(seq)
Definition: enum.hpp:28
sources::severity_logger_mt< severity_level > logger_type
Trivial logger type.
Definition: trivial.hpp:74
detail::keywords< 1 > args(char const *name)
Definition: args.hpp:156

The macro declares a global logger that will be constructed with the specified arguments.

#define BOOST_LOG_INLINE_GLOBAL_LOGGER_DEFAULT (   tag_name,
  logger 
)
Value:
{\
return logger_type();\
}
#define BOOST_LOG_INLINE_GLOBAL_LOGGER_INIT(tag_name, logger)
The macro declares a global logger with a custom initialization.
Definition: global_logger_storage.hpp:180
sources::severity_logger_mt< severity_level > logger_type
Trivial logger type.
Definition: trivial.hpp:74

The macro declares a global logger that will be default-constructed.

#define BOOST_LOG_INLINE_GLOBAL_LOGGER_INIT (   tag_name,
  logger 
)
Value:
BOOST_LOG_GLOBAL_LOGGER(tag_name, logger)\
inline BOOST_LOG_GLOBAL_LOGGER_INIT(tag_name, logger)
#define BOOST_LOG_GLOBAL_LOGGER(tag_name, logger)
The macro forward-declares a global logger with a custom initialization.
Definition: global_logger_storage.hpp:148
#define BOOST_LOG_GLOBAL_LOGGER_INIT(tag_name, logger)
The macro defines a global logger initialization routine.
Definition: global_logger_storage.hpp:162

The macro declares a global logger with a custom initialization.