template<typename CharT, typename FinalT, typename ThreadingModelT, typename FeaturesT>
class boost::sources::basic_composite_logger< CharT, FinalT, ThreadingModelT, FeaturesT >
A composite logger that inherits a number of features.
The composite logger is a helper class that simplifies feature composition into the final logger. The user's logger class is expected to derive from the composite logger class, instantiated with the character type, the user's logger class, the threading model and the list of the required features. The former three parameters are passed to the basic_logger
class template. The feature list must be an MPL type sequence, where each element is a unary MPL metafunction class, that upon applying on its argument results in a logging feature class that derives from the argument. Every logger feature provided by the library can participate in the feature list.
template<typename CharT , typename FinalT , typename ThreadingModelT , typename FeaturesT >
The method adds an attribute to the source-specific attribute set.
The attribute will be implicitly added to every log record made with the current logger.
- Parameters
-
name | The attribute name. |
attr | The attribute factory. |
- Returns
- A pair of values. If the second member is
true
, then the attribute is added and the first member points to the attribute. Otherwise the attribute was not added and the first member points to the attribute that prevents addition.
References boost::lock().
template<typename CharT , typename FinalT , typename ThreadingModelT , typename FeaturesT >
template<typename CharT , typename FinalT , typename ThreadingModelT , typename FeaturesT >
template<typename ArgsT >
The method opens a new log record in the logging core.
- Parameters
-
args | A set of additional named arguments. The parameter is ignored. |
- Returns
- A valid record handle if the logging record is opened successfully, an invalid handle otherwise.
References boost::lock(), and boost::expressions::record.
template<typename CharT , typename FinalT , typename ThreadingModelT , typename FeaturesT >
The method removes all attributes from the logger.
All iterators and references to the removed attributes are invalidated.
References boost::lock().
template<typename CharT , typename FinalT , typename ThreadingModelT , typename FeaturesT >
The method installs the whole attribute set into the logger.
All iterators and references to elements of the previous set are invalidated. Iterators to the attrs set are not valid to be used with the logger (that is, the logger owns a copy of attrs after completion).
- Parameters
-
attrs | The set of attributes to install into the logger. Attributes are shallow-copied. |
References boost::lock().