Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct template severity

boost::log::sources::severity — Severity level support feature.

Synopsis

// In header: <boost/log/sources/severity_feature.hpp>

template<typename LevelT = int> 
struct severity {
  // member classes/structs/unions
  template<typename BaseT> 
  struct apply {
    // types
    typedef basic_severity_logger< BaseT, LevelT > type;
  };
};

Description

The logger with this feature registers a special attribute with an integral value type on construction. This attribute will provide severity level for each log record being made through the logger. The severity level can be omitted on logging record construction, in which case the default level will be used. The default level can also be customized by passing it to the logger constructor.

The type of the severity level attribute can be specified as a template parameter for the feature template. By default, int will be used.


PrevUpHomeNext