2
0
mirror of https://github.com/boostorg/log.git synced 2026-02-09 11:12:38 +00:00

Merged recent changes from trunk. Fixes #8730.

[SVN r85093]
This commit is contained in:
Andrey Semashev
2013-07-20 18:09:32 +00:00
parent 1720f79e9a
commit cdd85fc887
17 changed files with 447 additions and 195 deletions

View File

@@ -48,7 +48,9 @@
#include <boost/log/detail/light_rw_mutex.hpp>
#endif // !defined(BOOST_LOG_NO_THREADS)
#include "parser_utils.hpp"
#if !defined(BOOST_LOG_WITHOUT_DEFAULT_FACTORIES)
#include "default_filter_factory.hpp"
#endif
#include "spirit_encoding.hpp"
#include <boost/log/detail/header.hpp>
@@ -94,17 +96,27 @@ struct filters_repository :
#endif
//! The map of filter factories
factories_map m_Map;
#if !defined(BOOST_LOG_WITHOUT_DEFAULT_FACTORIES)
//! Default factory
mutable aux::default_filter_factory< char_type > m_DefaultFactory;
#endif
//! The method returns the filter factory for the specified attribute name
filter_factory_type& get_factory(attribute_name const& name) const
{
typename factories_map::const_iterator it = m_Map.find(name);
if (it != m_Map.end())
{
return *it->second;
}
else
{
#if !defined(BOOST_LOG_WITHOUT_DEFAULT_FACTORIES)
return m_DefaultFactory;
#else
BOOST_LOG_THROW_DESCR(setup_error, "No filter factory registered for attribute " + name.string());
#endif
}
}
private: