senf::log::Enabled< Stream, Area, Level > Struct Template Reference
[Configuration]

Check, if logging is enabled for stream/area/level tuple. More...

#include <senf/Utils/Logger/Config.hh>

List of all members.


Detailed Description

template<class Stream, class Area, class Level>
struct senf::log::Enabled< Stream, Area, Level >

Check, if logging is enabled for stream/area/level tuple.

This is a template meta-function which will check, whether logging to the given combination of parameters Stream, Area and Level is compile-time enabled. The logging might still be disabled at runtime.

if (senf::log::Enabled<senf::log::Debug,
                       senf::log::DefaultArea,
                       senf::log::VERBOSE>::value) {
    // ...
}

Since the value member is a compile time constant, the compiler will completely optimize away this block of code when logging is disabled.

Definition at line 214 of file Config.hh.


Static Public Attributes

static const bool  value

Member Data Documentation

template<class Stream , class Area , class Level >
const bool senf::log::Enabled< Stream, Area, Level >::value
[static]

Initial value:

 (
            (Level::value == NONE::value ? Stream::defaultLevel::value : Level::value)
                >= detail::Config<Stream,Area>::compileLimit::value )

Definition at line 216 of file Config.hh.


The documentation for this struct was generated from the following file: